Pro*C++ Resultset Data types question [message #591287] |
Fri, 26 July 2013 03:07 |
|
paranada_g
Messages: 1 Registered: July 2013 Location: england
|
Junior Member |
|
|
Hi,
I want to migrate an application in pro*c as all the mass code of pro*c will be simplify as much as possible. To do so, i neet to access de data base data throw a resultset, so i don,t neet to know which data(And type, "int, string, etc") is extracted from the data base until i execute the query.
OCI library provides a resultset and by using the metadata object it,s possbile to know which kind of data type is the column you have acceesed in the select.
For example ( I have invented the example )
resultset rs = "Select name, age from clients";
execute rs;
Metadata m = rs->getMetaObjet();
int columnName = 0;
int columnAge = 1;
//It should return a number associated to string data type
short typeName = m->getColumnDataTupe( columnName );
//It should return a number associated to int data type
short typeAge = m->getColumnDataTupe( columnAge );
So typeName should give me the number associated to the string data type.
So typeAge should give me the number associated to the int data type.
Is there a way to do so in Pro*c++.
Thank you very much.
|
|
|