Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OCCI C++ how return prevRow or Row by index?

4182438Feb 12 2020 — edited Feb 12 2020

Statement return ResultSet, but ResultSet contain only method next() for inc current pointer row.

Me need for example method prev() or getRow(int index) from ResultSet. It's really?

Or I must create list and in cycle to fill it in???

Environment *env = Environment::createEnvironment();

{

     Connection *conn = env->createConnection( userName, password, connectString);

     Statement *stmt = conn->createStatement( "SELECT blobcol FROM mytable");

     ResultSet *rs = stmt->executeQuery(); rs->next(); // but me need prev()

     std::string b = rs->getString(1);

     //...

     stmt->closeResultSet(rs);

     conn->terminateStatement(stmt);

     env->terminateConnection(conn);

}

Environment::terminateEnvironment(env);

Comments
Post Details
Added on Feb 12 2020
0 comments
532 views