SQLGetDescField
SQLGetDescField#
This retrieves an attribute of descriptor. Unicode SQLGetDescFieldW() supports same execution as SQLGetDescField().
Syntax#
SQLRETURN SQLGetDescField (
SQLHDESC desc,
SQLSMALLINT recNumber,
SQLSMALLINT fieldIdentifier,
SQLPOINTER ValuePtr,
SQLINTEGER *bufferLength,
SQLINTEGER *stringLengthPtr);
Arguments#
Data Type | Argument | In/Out | Description |
---|---|---|---|
SQLHDESC | desc | Input | Descriptor Handle |
SQLSMALLINT | recNumber | Input | This starts from 1 of column number. |
SQLSMALLINT | fieldIdentifier | Input | This specifies the attribute of column to retrieve. |
SQLPOINTER | ValuePtr | Output | BUffer pointer where attributes are saved |
SQLINTEGER * | bufferLength | Input | ValuePtr size |
SQLINTEGER * | stringLengthPtr | Output | Size specified in ValuePtr |
Return Value#
SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_NO_DATA
SQL_INVALID_HANDLE
SQL_ERROR
Description#
This retrieves one column information with descriptor handle.
Diagnostics#
SQLSTATE | Description | Comments |
---|---|---|
HY000 | General Error | No error occurs explicitly. |
HY001 | Memory Allocation Error | This denotes to fail to allocate memory for handle. |
HY010 | Function Sequence Error | |
01004 | Data is cut off | The size of ValuePtr buffer is lesser than the size of returned data |
07009 | Invalid Descriptor Index | The value of recNumber is incorrect. |
Related Function#
SQLGetDescRec
SQLSetDescField
SQLSetDescRec