System.Data.OleDb Namespace OleDbConnection Class
Returns the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Script |
[ integer variable = ] OleDbConnection.ConnectionTimeout |
variable |
Returns the time ( in seconds ) to wait for a connection to open. |
The property is read only with a default value of 15 seconds.
NOTE: You can change the value for this property only by setting the associated keyword in the ConnectionString property.
A value of 0 indicates no limit, and should be avoided in a ConnectionString because an attempt to connect will wait indefinitely.
The following example shows the simplest way to retrieve and display the ConnectionTimeout property of the current connection.
"Time Out: " + myConn.ConnectionTimeout.ToString ( );
"Time Out: " + myConn.ConnectionTimeout.ToString ( ) |
|
C# |
VB |
Show me
OleDbConnection Members ConnectionString Database DataSource