Error

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?
 
A

Anwar

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top