SQLNext
- Last UpdatedJul 18, 2023
- 1 minute read
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:
The DB connection object, returned from either SQLCreate or SQLConnect function. The handle identifies the DB connection object where details of the associated SQL connection are stored.
Or:
The recordset.
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, SQLGetScalar, SQLEnd, SQLNumChange, SQLNoFields, SQLNumFields, SQLFieldInfo, SQLGetField, SQLIsNullField, SQLRowCount, SQLPrev
Example
See SQLConnect.