CODBC.SetConnectAttrmethod
Sets attributes that govern aspects of connections.
Syntax
FUNCTION SetConnectAttr (BYVAL Attribute AS SQLINTEGER, BYVAL ValuePtr AS SQLPOINTER, BYVAL StringLength AS SQLINTEGER) AS SQLRETURN
FUNCTION SetConnectAttr (BYREF wszAttribute AS WSTRING, BYVAL dwAttribute AS SQLUINTEGER) AS SQLRETURN
FUNCTION SetConnectAttr (BYREF wszAttribute AS WSTRING, BYREF wszAttrValue AS WSTRING) AS SQLRETURN
Parameters
| Name | Description | |
|---|---|---|
Attribute | Attribute to set, listed in "Comments." | |
ValuePtr | Pointer to the value to be associated with Attribute. Depending on the value of Attribute, ValuePtr will be a 32-bit unsigned integer value or will point to a null-terminated character string. Note that if the Attribute argument is a driver-specific value, the value in ValuePtr may be a signed integer. | |
StringLength | If Attribute is an ODBC-defined attribute and ValuePtr points to a character string or a binary buffer, this argument should be the length of ValuePtr. If Attribute is an ODBC-defined attribute and ValuePtr is an integer, StringLength is ignored. If Attribute is a driver-defined attribute, the application indicates the nature of the attribute to the Driver Manager by setting the StringLength argument. StringLength can have the following values:
| |
wszAttribute | Attribute to set. | |
dwAttribute | The value to set. | |
wszAttrValue | The value to set. |
Return value
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, SQL_INVALID_HANDLE, or SQL_STILL_EXECUTING.
The current value of the attribute.
Description
Sets attributes that govern aspects of connections.
Reference
- Include file
CODBCDbc.inc - Defined in AfxNova/COdbcDbc.inc:217
- Documented in Databases/ODBC Classes/CODBC Class.md
- Topic: ODBC Classes