G
Girish Pal Singh
string strconnection="Provider=Microsoft.Jet.OleDb.4.0;";
strconnection+=@"Data Source=C:\Inetpub\wwwroot\testpro\ptest.mdb";
OleDbConnection con=new OleDbConnection(strconnection);
con.Open();
OleDbCommand cmd=new OleDbCommand("insert into candidate (cname,
uid) values ('"+this.name.Text+"', '"+this.uid.Text+"')",con);
cmd.ExecuteNonQuery();
Response.Write(cmd.CommandText);
The above code throws exception saying that
System.Data.OleDb.OleDbException: Operation must use an updateable
query.
Why?
strconnection+=@"Data Source=C:\Inetpub\wwwroot\testpro\ptest.mdb";
OleDbConnection con=new OleDbConnection(strconnection);
con.Open();
OleDbCommand cmd=new OleDbCommand("insert into candidate (cname,
uid) values ('"+this.name.Text+"', '"+this.uid.Text+"')",con);
cmd.ExecuteNonQuery();
Response.Write(cmd.CommandText);
The above code throws exception saying that
System.Data.OleDb.OleDbException: Operation must use an updateable
query.
Why?