Pregunta

Using oracle OCCI is it possible instead of supplying an index for the column when requesting data from a query resultset, to actually pass the column name and get the data?

So instead of doing: (pseudocode)

std::string query = "SELECT NAME FROM CUSTOMERS;";

std::string myresult = oracle.getString(1); // name column in query

you'd do this:

std::string myresult = oracle.getString("NAME"); //column name to get string from

is there any way to do this? I have looked around, but been unable to find anything, besides perhaps going to fetch the table's metadata.

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top