DBCursorColumnInfo
- Last UpdatedAug 07, 2026
- 2 minute read
DBCursorColumnInfo 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 |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
DBCursorColumnInfo |
Database/ERP |
Synchronous |
Yes |
Supported |
Supported |
Not supported |
Supported |
Supported |
Syntax
DBCursorColumnInfo(numCur, numColumn, numTypeInfo, "optStrErrorTag")
numCur
The cursor handle for the result set, which was returned by DBCursorOpen or DBCursorOpenSQL.
numColumn
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.
numTypeInfo
The type of information you want to get about the column:
|
Value |
Description |
|---|---|
|
0 |
Column name |
|
1 |
Column data type |
optStrErrorTag
The name of a project tag that will receive detailed error messages, if errors occur during project run time.
Note: If this parameter is enclosed in quotes, the string literal will be used. Otherwise, the value of the tag/expression will be used.
This parameter is optional.
Return value
In the case of success, this function returns 0.
In the case of error, this function returns one of the following possible values:
|
Value |
Error Message |
|---|---|
|
-1 |
|
|
-2 |
|
|
-3 |
|
|
-4 |
|
|
-5 |
|
|
-6 |
|
|
-7 |
|
|
-8 |
|
|
-9 |
|
|
-10 |
|
|
-100 |
|
|
-101 |
|
|
-102 |
|
|
-103 |
|
|
-104 |
|
|
-105 |
|
|
-106 |
|
|
-107 |
|
|
-108 |
|
|
-109 |
|
|
-110 |
|
|
-111 |
|
|
-112 |
|
|
-113 |
|
|
-114 |
|
|
-115 |
|
|
-199 |
|
|
-200 |
|
|
-201 |
|
|
-202 |
|
Notes
Database/ERP functions emulate Structured Query Language (SQL) database operations. Before you use these functions, familiarize yourself with how SQL statements are formed and executed.
You can use the Database Gateway (StADOSvr) to directly monitor database connections for leaks and errors. For more information, see Database Interface.
Examples
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. |