exec()  getCols()

Chapter 5: General Objects and Methods

fetch()

Description

Retrieves the next row of data and uses the current statement object to process the data in the row. Can be used in conjunction with getResultRow() in a loop, as shown in the example below.

Syntax

fetch();

Return value

Integer. Returns a positive integer if successful, 0 for the end of the result set, or negative integer, if failed.

Examples

Example 51

while(resultRows < Rows)
{
     resultRows = db_main.getResultRows();
     if(resultRows == 10)break;
     db_main.fetch();
     db_main.getRowData(resultRows + 1, &dataptr);
     dataptr.debug();
     tempest = dataptr;
     i++;
     zaxxon = i;
     if(tempest.substr(zaxxon) > 1)
     {
          message = “rowcolCheck(“ + (i+17)+”)	“;
          WriteResults(message,1 );
     }
     else
     {
          message = “rowcolCheck(“ + (i+17)+)	“;
     }
}




Copyright © 2005. Sybase Inc. All rights reserved. getCols()

View this book as PDF