Cicode Programming Reference > Cicode Function Categories > SQL Functions > SQLNext

SQLNext

Gets the next database record from an SQL query. Use the SQLExec()/SQLGetRecordset() function to select a number of records or rows from the SQL database, and then use the SQLNext() function to step through each record separately.

When the hGeneral is the connection handle, the function moves in the default recordset. When the hGeneral is the recordset handle, the function moves in the recordset itself.

This function can be called in the foreground or background.

Syntax

SQLNext(hGeneral)

hGeneral:

The handle either to:

Return Value

0 (zero) if successful, otherwise an error number is returned. (For details of the 307 error code, call the SQLErrMsg function).

Related Functions

SQLSet, SQLAppend, SQLExec, SQLGetRecordset, SQLCall, SQLGetScalar, SQLEnd, SQLNumChange, SQLNoFields, SQLNumFields, SQLFieldInfo, SQLGetField, SQLIsNullField, SQLRowCount, SQLNext, SQLPrev

Example

See SQLConnect

See Also

SQL Functions

Published June 2018