4D v16

ODBC_SQLGetConnectAttr

ホーム

 
4D v16
ODBC_SQLGetConnectAttr

ODBC_SQLGetConnectAttr 


 

ODBC_SQLGetConnectAttr ( connectionID ; attribute ; valuePtr ) -> 戻り値 
引数   説明
connectionID  倍長整数 in Connection ID
attribute  倍長整数 in Attribute to retrieve
valuePtr  ポインター in Pointer to the current value of the attribute
戻り値  倍長整数 in Returns the result of the MS ODBC API function SQLGetConnectAttr

説明   

The ODBC_SQLGetConnectAttr command returns the current setting of a connection attribute passed in attribute. This command can be used in conjunction with ODBC_SetConnectAttr.

connectionID is a valid connection ID returned by either ODBC_SQLAllocConnect before or ODBC_SQLConnect after having established a connection to a data source depending on attribute.

attribute is the connection attribute to retrieve and can be one of the following values:

ConstantDescription
SQL_ATTR_ACCESS_MODERead-only or read-write
SQL_ATTR_ASYNC_ENABLEDefines if a function can be executed asynchronously
SQL_ATTR_AUTOCOMMITAutocommit or manual-commit mode
SQL_ATTR_CONNECTION_TIMEOUTNumber of seconds to wait for a request to complete
SQL_ATTR_CURRENT_CATALOGName of the catalog to be used by the data source
SQL_ATTR_LOGIN_TIMEOUTNumber of seconds to wait for a login request
SQL_ATTR_METADATA_IDDetermines how the string arguments of catalog functions are treated
SQL_ATTR_ODBC_CURSORSSpecifies how the Driver Manager uses the ODBC cursor
SQL_ATTR_PACKET_SIZENetwork packet size in bytes
SQL_ATTR_QUIET_MODEDoes not display any dialog boxes, except ODBC_SQLDriverConnect
SQL_ATTR_TRACETracing on or off
SQL_ATTR_TRACEFILEName of the trace file
SQL_ATTR_TRANSLATE_LIBName of a library containing to perform tasks, such as character set translation
SQL_ATTR_TRANSLATE_OPTIONA value passed to the trnaslation DLL
SQL_ATTR_TXN_ISOLATIONSet the transaction isolation level for connection

valuePtr is a pointer to the current value of the attribute defined in the attribute parameter. The variable valuePtr points to must be a String variable.

For more information, please see the SQLGetConnectAttr function in the MS ODBC API Reference at http://msdn.microsoft.com/en-us/library/ms710297(VS.85).aspx.

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA, SQL_ERROR, or SQL_INVALID_HANDLE.

例題  

The following method sets a connection attribute and then retrieves it:

 C_STRING(255;vCatalogName;vNewCatalogName)
 vCatalogName:="MyCatalogName"
 $result:=ODBC_SQLSetConnectAttr($connectionID;SQL_ATTR_CURRENT_CATALOG;->vCatalogName)
 $result:=ODBC_SQLGetConnectAttr($connectionID;SQL_ATTR_CURRENT_CATALOG;->vNewCatalogName)



参照 

ODBC_SQLSetConnectAttr

 
プロパティ 

プロダクト: 4D
テーマ: ODBC_Driver attributes
番号: 16984

 
履歴 

初出: 4D ODBC Pro 2004

 
ARTICLE USAGE

4D ODBC Pro ( 4D v16)