Hi
I'm using Odac 4.50 and considering an upgrade to the latest version.
However, I've been told that the latest version of Odac only supports one version of the PutColumnData function. i.e , the following is supported
Loader->PutColumnData(1,2,"Hello");
and the following is no longer supported
Loader->PutColumnData("STRING",2,"Hello");
Is this true? Is the second version no longer supported?
Since the app I've created uses the second version, it means that I will not be able to upgrade
PutColumnData problem
Hi
I've downloaded the latest ODAC trial version from the website as you have suggested and it fails .
If I look at the OraLoader.hpp file , i see the following
__fastcall virtual TOraLoader(Classes::TComponent* Owner);
__fastcall virtual ~TOraLoader(void);
virtual void __fastcall PutColumnData(int Col, int Row, const Variant &Value)/* overload */;
virtual void __fastcall CreateColumns(void);
The version of ODAC that I have (4.50.0.15) has an extra line in the OraLoader.hpp file
__fastcall virtual TOraLoader(Classes::TComponent* Owner);
__fastcall virtual ~TOraLoader(void);
void __fastcall PutColumnData(int Col, int Row, const Variant &Value)/* overload */;
void __fastcall PutColumnData(AnsiString ColName, int Row, const Variant &Value)/* overload */;
void __fastcall Load(void);
void __fastcall CreateColumns(void);
Ive noticed that this line has been moved to DALoader.hpp which OraLoader.hpp derives from, so in theory it should work.
I've tried this with my existing app and with a newly created app.
In the newly created app I dropped a session component and a TOraLoader component. In the PutData function I added one line
OraLoader1->PutColumnData("Hello",4,"String");
I hooked neither component up to any database.
On compilation, I got the following error
E2342 Type mismatch in parameter 'Col' (wanted 'int', got 'char *')
I've downloaded the latest ODAC trial version from the website as you have suggested and it fails .
If I look at the OraLoader.hpp file , i see the following
__fastcall virtual TOraLoader(Classes::TComponent* Owner);
__fastcall virtual ~TOraLoader(void);
virtual void __fastcall PutColumnData(int Col, int Row, const Variant &Value)/* overload */;
virtual void __fastcall CreateColumns(void);
The version of ODAC that I have (4.50.0.15) has an extra line in the OraLoader.hpp file
__fastcall virtual TOraLoader(Classes::TComponent* Owner);
__fastcall virtual ~TOraLoader(void);
void __fastcall PutColumnData(int Col, int Row, const Variant &Value)/* overload */;
void __fastcall PutColumnData(AnsiString ColName, int Row, const Variant &Value)/* overload */;
void __fastcall Load(void);
void __fastcall CreateColumns(void);
Ive noticed that this line has been moved to DALoader.hpp which OraLoader.hpp derives from, so in theory it should work.
I've tried this with my existing app and with a newly created app.
In the newly created app I dropped a session component and a TOraLoader component. In the PutData function I added one line
OraLoader1->PutColumnData("Hello",4,"String");
I hooked neither component up to any database.
On compilation, I got the following error
E2342 Type mismatch in parameter 'Col' (wanted 'int', got 'char *')
Try to use next syntax when you call overloaded PutColumnData function:
Code: Select all
((TDALoader *)OraLoader1)->PutColumnData("Hello",4,"String");