string strconnection=" Provider=Micros oft.Jet.OleDb.4 .0;";
strconnection+= @"Data Source=C:\Inetp ub\wwwroot\test pro\ptest.mdb";
OleDbConnection con=new OleDbConnection (strconnection) ;
con.Open();
OleDbCommand cmd=new OleDbCommand("i nsert into candidate (cname,
uid) values ('"+this.name.T ext+"', '"+this.uid.Tex t+"')",con);
cmd.ExecuteNonQ uery();
Response.Write( cmd.CommandText );
The above code throws exception saying that
System.Data.Ole Db.OleDbExcepti on: Operation must use an updateable
query.
Why?
strconnection+= @"Data Source=C:\Inetp ub\wwwroot\test pro\ptest.mdb";
OleDbConnection con=new OleDbConnection (strconnection) ;
con.Open();
OleDbCommand cmd=new OleDbCommand("i nsert into candidate (cname,
uid) values ('"+this.name.T ext+"', '"+this.uid.Tex t+"')",con);
cmd.ExecuteNonQ uery();
Response.Write( cmd.CommandText );
The above code throws exception saying that
System.Data.Ole Db.OleDbExcepti on: Operation must use an updateable
query.
Why?
Comment