G
Guest
Hi
I am getting the 'Operation must use an updateable query' error when i am trying to insert some data into the access db!
I have checked for the permissions, all the permissions are ok, at the same time i also changed the settings in machinge.config file from 'machine' to 'SYSTEM'. Any other ideas of why it gives that error, this is the code
Dim sPath As String = Server.MapPath("db/dbname.mdb"
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;
sConn +="DATA Source=" & sPath & ";
sConn += "Persist Security Info=False
oConn = New OleDbConnection(sConn
strinsert="insert into dattbl_movies(type,genre,title,rating) values(?,?,?,?)
cmdinsert=New OledbCOmmand(strinsert,oConn)
cmdinsert.Parameters.Add("@type",rdtype.SelectedValue
cmdinsert.Parameters.Add("@genre",txtgenre.text
cmdinsert.Parameters.Add("@title",txttitle.text
cmdinsert.Parameters.Add("@rating",txtrating.text)
oConn.Open(
cmdinsert.ExecuteNonQuery(
oConn.Close(
Thanks in advance
Ken
I am getting the 'Operation must use an updateable query' error when i am trying to insert some data into the access db!
I have checked for the permissions, all the permissions are ok, at the same time i also changed the settings in machinge.config file from 'machine' to 'SYSTEM'. Any other ideas of why it gives that error, this is the code
Dim sPath As String = Server.MapPath("db/dbname.mdb"
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;
sConn +="DATA Source=" & sPath & ";
sConn += "Persist Security Info=False
oConn = New OleDbConnection(sConn
strinsert="insert into dattbl_movies(type,genre,title,rating) values(?,?,?,?)
cmdinsert=New OledbCOmmand(strinsert,oConn)
cmdinsert.Parameters.Add("@type",rdtype.SelectedValue
cmdinsert.Parameters.Add("@genre",txtgenre.text
cmdinsert.Parameters.Add("@title",txttitle.text
cmdinsert.Parameters.Add("@rating",txtrating.text)
oConn.Open(
cmdinsert.ExecuteNonQuery(
oConn.Close(
Thanks in advance
Ken