Insert data into ms access using asp.net
Here is the code I am using to try to input responses included in dynamic text boxes into an access database:
'Dim myInsertQuery As String
'myInsertQuery = "INSERT INTO tblTestQues (Answer) Values ('22');"
'Dim myCommand2 As New OleDbCommand(myInsertQuery)
'myCommand2.Connection = MyConnection
'MyConnection.Open()
'myCommand2.ExecuteNonQuery()
'myCommand2.Connection.Close()
I keep getting the error: System.Data.OleDb.OleDbException: Operation must use an updateable query.
My access database is a read only file. I'm guessing this might be the problem. I do not know how to correct this. Any suggestions. Thanks in advanced. Or does anyone know of another method i can use to put info from text boxes into a database.