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

SQLNumFields

When hGeneral is the connection handle, the function returns the number of fields or columns that were returned by the last SQL statement. When hGeneral is the recordset handle, the function returns the number of fields or columns in the recordset itself.

This function can be called in the foreground or background.

Syntax

SQLNumFields(hGeneral)

hGeneral:

The handle either to:

Return Value

The number of fields. A value of 0 is returned if no fields were returned or if an error has been detected. (For details of an 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 SQLFieldInfo

See Also

SQL Functions

Published June 2018