Gets information about a column in a SQL result set. The column is specified by number rather than by name, so this function can be used to retrieve unknown column names.

Function Group Execution Windows Embedded Thin Client
DBCursorColumnInfo Database/ERP Synchronous Supported Supported Supported
Note: This feature emulates SQL (Structured Query Language) database operations. You should be familiar with how SQL commands are formed and executed before you use this feature.


DBCursorColumnInfo( numCur, numColumn, numTypeInfo, "optStrErrorTag" )
The cursor handle of the result set. The cursor handle is returned by DBCursorOpen or DBCursorOpenSQL.
The number of the column about which you want to get information. Remember that a result set may include only some of the columns in the original database table.
The type of information you want to get about the column:
Value Description
0 Column name
1 Column data type
The name of a String tag that will receive detailed error messages, if errors occur during runtime.
Note: The tag name must be enclosed in quotes, as shown in the syntax diagram, or else the project will try to get the value of the named tag.

This is an optional parameter.

Returned value

In case of error, returns a negative number. Otherwise, returns 0.


As used in a Math worksheet:
Tag Name Expression
nErrorCode DBCursorColumnInfo( nCursor, 2, 0 ) // Gets the column name of the second column in the result set.