ODBC Users` Manual

Add to My manuals
280 Pages

advertisement

ODBC Users` Manual | Manualzz

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

SQLHDESC

SQLSMALLINT

SQLSMALLINT

SQLPOINTER

SQLINTEGER *

SQLINTEGER *

Argument desc recNumber fieldIdentifier In

In

In

In/Out

ValuePtr Out bufferLength In stringLength-

Ptr

Out

Description

Descriptor Handle

This starts from 1 of column number.

This specifies the attribute of column to retrieve.

Buffer pointer where attributes are saved

ValuePtr Size

Size speciified in ValuePtr

Return Value

SQL_SUCCESS

SQL_SUCCESS_WITH_INFO

SQL_NO_DATA

SQL_INVALID_HANDLE

SQL_ERROR

ODBC Users’ Manual 98

SQLGetDescField

Description

This retrieves one column information with descriptor handle.

Diagnostics

SQLSTATE

HY000

HY001

Description

General Error

Memory Allocation Error

HY010

01004

07009

Function Sequence Error

Cutted Resource

Invalid Descriptor Index

Related Function

SQLGetDescRec

SQLSetDescField

SQLSetDescRec

Comments

No error occurs explicitly.

This denotes to fail to allocate memory for handle.

The size of ValuePtr buffer is lesser than the size of returned data.

The value of recNumber is incorrect.

99 ODBC Functions

advertisement

advertisement

Table of contents