J
John
Hi
I am getting [OleDbException (0x80004005): Operation must use an updateable
query.] error on ExecuteNonQuery() . Full code is given below. The values I
have given are; ('trtrt', 'retret', '1/1/2', '333'). The application is an
asp.net webform. Any idea what is the problem?
Thanks
Regards
Dim sSQL As String = "INSERT into Applications (forenames, surname, dob,
[number]) " & _
"VALUES ('" & txtForenames.Text & "', '" & txtSurname.Text & "', '" &
txtDOB.Text & "', '" & txtNumber.Text & "')"
' Response.Write(sSQL)
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("/") + "Staff_Application/Staff_Application.mdb" & ";"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(sSQL, MyConn)
MyConn.Open()
cmd.ExecuteNonQuery() '<=== This line gives the error.
MyConn.Close()
I am getting [OleDbException (0x80004005): Operation must use an updateable
query.] error on ExecuteNonQuery() . Full code is given below. The values I
have given are; ('trtrt', 'retret', '1/1/2', '333'). The application is an
asp.net webform. Any idea what is the problem?
Thanks
Regards
Dim sSQL As String = "INSERT into Applications (forenames, surname, dob,
[number]) " & _
"VALUES ('" & txtForenames.Text & "', '" & txtSurname.Text & "', '" &
txtDOB.Text & "', '" & txtNumber.Text & "')"
' Response.Write(sSQL)
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("/") + "Staff_Application/Staff_Application.mdb" & ";"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(sSQL, MyConn)
MyConn.Open()
cmd.ExecuteNonQuery() '<=== This line gives the error.
MyConn.Close()