LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC-Connect via SQL-Toolkit 2.05 on Oracle 8.1.6 database?

How do I set the connection attribute "ATTR_DB_CONN_CONNECTION_TIMEOUT" with the SQL-Toolkit-function "DBSetConnectionAttribute" to connect an Oracle 8.1.6 database?
0 Kudos
Message 1 of 2
(3,315 Views)
I'm not really sure about the scope of your question, as to whether or not Oracle 8.1.6 supports the ATTR_DB_CONN_CONNECTION_TIMEOUT attribute or whether you just want to know how to make the function call.

If you want to know whether or not Oracle 8.1.6 supports the connection timeout attribute, it may or may not. Also, even if it does it may be implemented in a fashion that cannot be set through a call to this function. The only way to find out though is to look through the Oracle documentation, because the SQL toolkit and its documentation are meant to be as universal as possible, working with "most" databases and do not have any provider-specific information or compatibility.

However, if it is possible to use this connection attribute you simply make the fo
llowing function call:

status = DBSetConnectionAttribute(connectionhandle, ATTR_DB_CONN_CONNECTION_TIMEOUT, 100);

This call indicates that you want to set up a connection timeout attribute of 100 seconds. You will make this call after you have already called DBNewConnection to obtain the value for the "connectionhandle" parameter, and it will be called before the call to DBOpenConnection. If you look at the last page of the section on DBSetConnectionAttribute in the SQL toolkit manual there is a short example that illustrates this exactly.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 2
(3,315 Views)