Fetch Results

public virtual const STATUS& next_row(= 0;);

The job of next_row is simply to make the native library ready to provide data for the next row. The next_row function need not necessarily read those data.

next_row is called by execute, to set up the first row. Subsequent calls are generated by the dbstream when the application increments it. After the last row has been fetched, eofbit is returned. If further data are pending, the next call to next_row returns the first row of the next resultset.

On success, next_row sets the state to goodbit. After the last row is fetched, the state is set to eofbit. If no data are pending — that was the last row from the last SELECT statement — failbit is also set.

User-recoverable errors are indicated by setting the state to failbit alone.

Logical sequence errors — e.g. calling next_row before execute — throw an error. The application should never ask for functions out of order.