I have a query that I'm executing on a database that returns an array of records, I read in the Oracle OCCI documentation you have to use the ResultSet::setDataBuffer() function to fetch array's of data from the db.
I just don't get what I'm supposed to give as the first two args when a database row contains multiple columns of different data? What type should I give as my buffer type?
//example, does not contain all parts, just enough to demonstrate my point
SELECT AGE, BIRTHDATE, NAME FROM PEOPLE;
int i[10]; // Type of buffer??? Age is int, but name is a string?
ResultSet* res;
res->setDataBuffer(1 /*col index of first col in select statement*/, &i[0], OCCIINT, 10 * sizeof(int));
while(res->next()) { //Fetch data...}
I have searched Google for examples in vain so far. I'm hoping that someone here could help?