Hi,
I have a few questions about database connector:
1. Is there a way of setting cursor to the front of result set? For example, in MySQL C++ connector, they have function like
resultSet->beforeFirst(); // Put cursor to the beginning
2. Is there a way of getting metadata from result set? For example, in MySQL C++ connector, if we want to print all the column name from result set, we can
sql::ResultSetMetaData *metaData = resultSet->getMetaData(); int nrCols = metaData->getColumnCount(); for (int i = 1; i <= nrCols; i++) { pt(metaData->getColumnName(i)); pt(", "); }
3. How do I know the value returned from result set is an int or double? The value we get from resultSet[i] is a Variant. We are able to know if the value is a number or not. But we do not know if the number is a int or double.
Thanks,
Hao