Operation must use an updateable query Error!!!

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top