For general information about statement attributes, see Statement Attributes.
A call to SQLGetStmtAttr returns in *ValuePtr the value of the statement attribute specified in Attribute. That value can either be a 32-bit value or a null-terminated character string. If the value is a null-terminated string, the application specifies the maximum length of that string in the BufferLength argument, and the driver returns the length of that string in the *StringLengthPtr buffer. If the value is a 32-bit value, the BufferLength and StringLengthPtr arguments are not used.
To allow applications calling SQLGetStmtAttr to work with ODBC 2.x drivers, a call to SQLGetStmtAttr is mapped in the Driver Manager to SQLGetStmtOption.
The following statement attributes are read-only, so can be retrieved by SQLGetStmtAttr, but not set by SQLSetStmtAttr:
-
SQL_ATTR_IMP_PARAM_DESC
-
SQL_ATTR_IMP_ROW_DESC
-
SQL_ATTR_ROW_NUMBER
For a list of attributes that can be set and retrieved, see SQLSetStmtAttr.