return value

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DAN

return value

Post by DAN » Mon 27 Jun 2005 19:22

Hi
I'm using odac componnent for borland c++.
I creat a table and insert some values to the table.

Now i want to read a value from the table into c++ variable.
How can i do that ?

If i write select stetment like :

SELECT Company FROM Orders

How can i read the return value into my variable ?
How can i read more then one value into more then one variable ?

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

Post by Alex » Wed 29 Jun 2005 11:43

The work with our datasets is the same as with BDE datasets, you can access fetched data through dataset's Fields property. If you need more info please pay attention to the Borland help 'Developing Database Applications' folder. As a start point I can give you a simple example of accessing to dataset:

Code: Select all

OraQuery->SQL->Text = "Select * from MyTable";
OraQuery->Open();
int intValue = OraQuery->FieldByName("FieldName")->AsInteger;

Post Reply