Error

  • Thread starter Thread starter Girish Pal Singh
  • Start date Start date
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?
 
Hi,
Please check with your nerwork/server administrator that
you have enough privilages to update/insert data to your
access database.

Anwar

-----Original Message-----
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);
 
Back
Top