System.Data.OleDb Namespace OleDbCommand Class
Resets the CommandTimeout property to its default value.
[ VB ]
Public Sub ResetCommandTimeout ( )
[ C# ]
public void ResetCommandTimeout ( );
[ C++ ]
public: void ResetCommandTimeout ( );
[ JScript ]
public function ResetCommandTimeout ( );
The default value of the CommandTimeout is 30 seconds.
The following example illustrates using the ResetCommandTimeout method.
void ResetCommandTimeoutDemo ( string query, OleDbConnection myConn ) {
OleDbCommand myCommand = new OleDbCommand ( query, myConn );
myCommand.CommandTimeout = 15;
Response.Write ( myCommand.CommandTimeout.ToString ( ) );
myCommand.ResetCommandTimeout ( );
Response.Write ( myCommand.CommandTimeout.ToString ( ) );
}
Public Sub ResetCommandTimeoutDemo ( query As String, myConn As OleDbConnection )
Dim myCommand As New OleDbCommand ( query, myConn )
myCommand.CommandTimeout = 15
Response.Write ( myCommand.CommandTimeout.ToString ( ) )
myCommand.ResetCommandTimeout ( )
Response.Write ( myCommand.CommandTimeout.ToString ( ) )
End Sub |
|
C# |
VB |
OleDbCommand Members