PutColumnData problem

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Asif
Posts: 3
Joined: Tue 12 Apr 2005 11:33

PutColumnData problem

Post by Asif » Tue 12 Apr 2005 11:42

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

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 12 Apr 2005 13:02

You were misinformed. ODAC supports both functionality you need. In all cases you can try trial version of the latest ODAC to make your decision.

Asif
Posts: 3
Joined: Tue 12 Apr 2005 11:33

Post by Asif » Tue 12 Apr 2005 14:50

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 *')

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Wed 13 Apr 2005 06:46

Try to use next syntax when you call overloaded PutColumnData function:

Code: Select all

((TDALoader *)OraLoader1)->PutColumnData("Hello",4,"String");

Asif
Posts: 3
Joined: Tue 12 Apr 2005 11:33

Post by Asif » Wed 13 Apr 2005 07:33

That syntax seems to compile without errors

Thanks

Post Reply