SQLGetDescRec
SQLGetDescRec#
This retrieves multiple number of descriptor attributes. Unicode SQLGetDescRecW() supports same execution as SQLGetDescRec().
Syntax#
SQLRETURN SQLGetDescRec (
SQLHDESC desc,
SQLSMALLINT recNumber,
SQLCHAR *name,
SQLSMALLINT bufferLength,
SQLSMALLINT *stringLength,
SQLSMALLINT *type,
SQLSMALLINT *subType,
SQLLEN *lengthPtr,
SQLSMALLINT *precision,
SQLSMALLINT *scale,
SQLSMALLINT *nullable);
Arguments#
Data Type | Argument | In/Output | Description |
---|---|---|---|
SQLHDESC | desc | Input | Descriptor handle |
SQLSMALLINT | recNumber | Input | This starts from 1 of column number. |
SQLCHAR * | name | Output | Pointer receiving column name |
SQLSMALLINT | bufferLength | Input | Size of name buffer |
SQLSMALLINT * | stringLength | Output | Size specified in name |
SQLSMALLINT * | type | Output | Pointer receiving column type |
SQLSMALLINT * | subType | Output | Pointer receiving subtype of column |
SQLLEN * | lengthPtr | Output | Pointer receiving column length |
SQLSMALLINT * | precision | Ouput | Pointer receiving column precision |
SQLSMALLINT * | scale | Output | Pointer receiving column scale |
SQLSMALLINT * | nullable | Output | Pointer receiving whether to specify null in column |
Return Values#
SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_NO_DATA
SQL_INVALID_HANDLE
SQL_ERROR
Description#
The user can retrieve several information of column with descriptor handle.
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 | Function sequence error | |
01004 | Data is cut off | The size of name buffer is lesser than that of returned data. |
07009 | Invalid descriptor index | the value of recNumber is incorrect. |
Related Functions#
SQLBindCol
SQLBindParameter
SQLGetDescFiled