W
Wessam Bahnassi
Greetings,
I'm trying to insert values into an MDB with ASP.NET 1.1, and the OleDb Jet
4 provider.
However, whenever I issue and INSERT INTO statement I get the exception:
"Operation must use an updateable query."
This is my code:
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";
connString += Server.MapPath("db\\records.mdb");
connString += ";"
OleDbConnection connection = new OleDbConnection(connString);
connection.Open();
OleDbCommand dbCmd = new OleDbCommand("INSERT INTO DSKSB_Demos ",conn);
dbCmd.CommandText += "(Platform,Company,Title) VALUES (win32,sci,mr)";
dbCmd.ExecuteNonQuery(); // Exception...
conn.Close();
If I only read data then no errors occur. The MDB file is not set to
Read-only.
It's a normal file put in c:\inetpub\wwwroot\mysite\db
How can I overcome this exception?
Thanks for any help...
I'm trying to insert values into an MDB with ASP.NET 1.1, and the OleDb Jet
4 provider.
However, whenever I issue and INSERT INTO statement I get the exception:
"Operation must use an updateable query."
This is my code:
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";
connString += Server.MapPath("db\\records.mdb");
connString += ";"
OleDbConnection connection = new OleDbConnection(connString);
connection.Open();
OleDbCommand dbCmd = new OleDbCommand("INSERT INTO DSKSB_Demos ",conn);
dbCmd.CommandText += "(Platform,Company,Title) VALUES (win32,sci,mr)";
dbCmd.ExecuteNonQuery(); // Exception...
conn.Close();
If I only read data then no errors occur. The MDB file is not set to
Read-only.
It's a normal file put in c:\inetpub\wwwroot\mysite\db
How can I overcome this exception?
Thanks for any help...