SQLSetDescField
SQLSetDescField#
This specifies an attribute of descriptor. Unicode SQLSetDescFieldW() supports same execution as SQLSetDescField().
Syntax#
SQLRETURN SQLSetDescField (
SQLHDESC desc,
SQLSMALLINT recNumber,
SQLSMALLINT fieldIdentifier,
SQLPOINTER value,
SQLINTEGER bufferLength);
Arguments#
Data Type | Argument | In/Out | Description |
---|---|---|---|
SQLHDESC | desc | Input | Descriptor hanlde |
SQLSMALLINT | renNumber | Input | This starts from 1 of column number. |
SQLSMALLINT | fieldIdentifier | Input | This specifies the attribute of column to retrieve. |
SQLPOINTER | value | Input | Buffer pointer specifying attributes |
SQLINTEGER | bufferLength | Input | Value size |
Return Values#
SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_INVALID_HANDLE
SQL_ERROR
Description#
This specifies an attribute of descriptor.
Diagnosis#
SQLSTATE | Description | Comments |
---|---|---|
HY000 | General error | No error occurs explicitly. |
HY001 | Memory allocation error | This denotes to fail to allocate memory for handle. |
HY010 | Order error of calling function | |
07009 | Invalid descriptor index | The value of recNumber is incorrect. |
Related Functions#
SQLBindCol
SQLBindParameter
SQLGetDescField
SQLGetDescRec