Operation must use an updateable query.

  • Thread starter Thread starter David A. Schramm
  • Start date Start date
D

David A. Schramm

VS 2005 .NET 2.0
Access 2003

Help:

I have developed a simple web service to insert records into an Access
database.
When I run this service locally, it works. When I publish this service to
the web,
the service correctly finds the database and connects to it just fine.
However,
when the insert command is run, I get the following error:

Operation must use an updateable query.

Code:
oleConnection.ConnectionString = strConnectionString

Call oleConnection.Open()

strSQL = "Insert into Sales (CustomerName, CustomerEmail, State, SalesTax,
Receipt) " & _

"VALUES('" & theCustomer & "','" & theEmail & "','" & theState & "','" &
theSalesTax & "','" & theReceipt & "')"

oleCommand = New OleDbCommand(strSQL, oleConnection)

oleDataAdapter = New OleDbDataAdapter(oleCommand)

intRecordsInserted = oleCommand.ExecuteNonQuery()
 
Found the answer. The folder the mdb is in on the web site must permit the
default web user read / write permissions.
 

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

Back
Top