3.4 Statement Attributes

Table of Contents Previous Next


3 EDB-ODBC Driver Functionality : 3.4 Statement Attributes

You can use the ODBC SQLGetStmtAttr() and SQLSetStmtAttr() functions to retrieve and set the value of a statement attribute.
SQLHDBC stmt_handle, //Input
SQLINTEGER attribute, //Input
SQLPOINTER value_ptr, //Output
SQLINTEGER buffer_length, //Input
SQLINTEGER *string_length_pointer //Output
attribute is the attribute value
If the attribute is defined by ODBC, buffer_length is the length of value_pointer (if value_pointer points to a character string or binary buffer). If value_pointer points to an integer, buffer_length is ignored.
If EDB-ODBC defines the attribute, the application sets the buffer_length parameter. buffer_length can be:
The result of SQL_LEN_BINARY_ATTR(length)
SQL_IS_INTEGER or SQL_IS_UINTEGER
A pointer to an SQLINTEGER that receives the number of bytes required to hold the requested value. If value_pointer is NULL, string_length_pointer is not returned.
This function returns SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR or SQL_INVALID_HANDLE.

3 EDB-ODBC Driver Functionality : 3.4 Statement Attributes

Table of Contents Previous Next