0 Replies Latest reply on Feb 12, 2020 8:05 AM by 4182438

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

    4182438

      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);