3.4.2 SQLSetStmtAttr()

Table of Contents Previous Next



You can use the SQLSetStmtAttr() function to set the values of environment attributes. The signature is:
SQLHENV stmt_handle, //Input
SQLINTEGER attribute, //Input
SQLPOINTER value_pointer, //Input
SQLINTEGER string_length //Input
stmt_handle is the environment handle.
attribute identifies the statement attribute whose value you wish to set.
value_pointer is a pointer to the location in memory that holds the value that will be assigned to the attribute. value_pointer can be a pointer to:
A value of the type SQLLEN, SQLULEN or SQLUSMALLINT
A SQLUINTEGER value
A SQLULEN value
If attribute is defined by ODBC and value_pointer points to a binary buffer or character string, string_length is the length of value_pointer. If value_pointer points to an integer, string_length is ignored.
If EDB-ODBC defines the attribute, the application sets the string_length parameter. Possible string_length values are:
The result of SQL_LEN_BINARY_ATTR(length)
SQL_IS_INTEGER or SQL_IS_UINTEGER


Table of Contents Previous Next