ADO.NET ExecuteNonQuery in OleDbCommand Object
ExecuteNonQuery() is one of the most frequently used method in OleDbCommand Object and is used for executing statements that do not return result set. ExecuteNonQuery() performs Data Definition tasks as well as Data Manipulation tasks also. The Data Definition tasks like creating Stored Procedures and Views perform by ExecuteNonQuery() . Also Data Manipulation tasks like Insert , Update and Delete perform by ExecuteNonQuery().
The following example shows how to use the method ExecuteNonQuery() through OleDbCommand Object.
connetionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = Your mdb filename;"
sql = "Your SQL Statement Here"
You have to replace the string with your realtime variables.