Page 1 of 1

return value

Posted: Mon 27 Jun 2005 19:22
by DAN
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 ?

Posted: Wed 29 Jun 2005 11:43
by Alex
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;