asp.net.ph

OleDbCommand.Cancel Method

System.Data.OleDb Namespace   OleDbCommand Class


Cancels the execution of an OleDbCommand.

[ VB ]
NotOverridable Public Sub Cancel ( )

[ C# ]
public void Cancel ( );

[ C++ ]
public: __sealed void Cancel ( );

[ JScript ]
public function Cancel ( );

Implements

IDbCommand.Cancel

Remarks

If there is nothing to cancel, nothing happens. However, if there is a command in process, and the attempt to cancel fails, no exception is generated.

Example

The following example demonstrates the use of the Cancel method.

void CancelDemo ( string query, string connString ) {
   OleDbConnection myConn = new OleDbConnection ( connString );
   OleDbCommand myCommand = new OleDbCommand ( query, myConn );
   myCommand.Connection.Open ( );
   myCommand.ExecuteNonQuery ( );
   myCommand.Cancel ( );
}
  C# VB

See Also

OleDbCommand Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph