Function odbc_sys::SQLGetStmtAttr
source · pub unsafe extern "system" fn SQLGetStmtAttr(
hstmt: HStmt,
attribute: StatementAttribute,
value: Pointer,
buffer_length: Integer,
string_length: *mut Integer
) -> SqlReturn
Expand description
Returns the current setting of a statement attribute.
A call to SQLGetStmtAttr
returns in value
the value of the statement attribute specified
in attribute
. That value can either be a ULen
value or a null-terminated character
string. If the value is a ULen
value, some drivers may only write the lower 32-bit or
16-bit of a buffer and leave the higher-order bit unchanged. Therefore, applications should
use a buffer of ULen and initialize the value to 0 before calling this function. Also, the
buffer_lengthand
string_lengtharguments are not used. If the value is a null-terminated string, the application specifies the maximum length of that string in the
buffer_lengthargument, and the driver returns the length of that string in the
string_length` buffer.
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:
StatementAttribute::ImpParamDesc
StatementAttribute::ImpRowDesc
StatementAttribute::RowNumber
Returns
SUCCESS
, SUCCESS_WITH_INFO
, ERROR
, or INVALID_HANDLE
.