Execute Normal Query
Using Oledb
Execute Normal Query
Step 1: Establishing Connection
OleDbConnection OCon=new OleDbConnection(StrCon);
//StrCon is a connection String
Step 2: Execute Normal Query
OCon.Open();
OleDbCommand OCmd = new OleDbCommand(strQry, OCon);
//StrQry is Query
OCmd.ExecuteNonQuery();
OCon.Close();
Execute Normal Query
Step 1: Establishing Connection
SqlConnection OCon=new SqlConnection(StrCon);
//StrCon is a connection String
Step 2: Execute Normal Query
OCon.Open();
SqlCommand OCmd = new SqlCommand(strQry, OCon);
//StrQry is Query
OCmd.ExecuteNonQuery();
OCon.Close();
Labels: Delete in database, Insert, Update
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home