I m working with c#, in this i want to delete record from the form for that i have the following code..
private void button3_Click(object sender, EventArgs e)
{
OleDbConnection con = new OleDbConnection();
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Documents and Settings\\mayur patil\\My Documents\\Dairy_db\\tblCompany.mdb";
con.Open();
string sql = "DELETE FROM tblCompany WHERE (CoCode = 1)";
}
but i m not getting the answer…
You need to setup an OleDbCommand
The full code for your case,
For more information of the whole implementation, read here
http://www.java2s.com/Code/CSharp/Database-ADO.net/DeletedatabaserecordsthroughOleDbCommandandverifytheresults.htm