Operation must use an updateable query

J

Jon Cosby

This project had been working before, and I put it aside for a while. Now,
I'm getting an OleDB exceptation when I attempt to insert records into the
Access database:

Dim sqlInsertCust As String = "INSERT INTO Customers (CustomerID,
CustomerName) " + _
"VALUES ('" + CStr(custID) + "', 'New Customer')"
cmdInsertCust = New System.Data.OleDb.OleDbCommand(qryInsertCust, conn)
cmdInsertCust.ExecuteNonQuery()

--OleDbException: Operation must use an updateable query

What's up here? The database is not read-only, but that's the only thing
that comes to mind. The "Select" queries work here.
 
M

Miha Markic

Hi Jon,

It is probably a file security issue.
Is this an aspnet app?
Does the account have enough privileges on database file?
 
J

Jon Cosby

Miha Markic said:
Hi Jon,

It is probably a file security issue.
Is this an aspnet app?

Yes, it is.
Does the account have enough privileges on database file?
Aspnet has privelages in SQL, I don't recall how to configure it for Access.

Jon
 
M

Miha Markic

Hi Jon,

Jon Cosby said:
Yes, it is.

Aspnet has privelages in SQL, I don't recall how to configure it for
Access.

Give user aspnet enough privileges on mdb file itself (read/write access)
and access to all folders in the path.
 
J

Jon Cosby

Miha Markic said:
Hi Jon,


Access.

Give user aspnet enough privileges on mdb file itself (read/write access)
and access to all folders in the path.

I don't recall going through this with Access and OLEDB. Users have full
permissions in the db. The select queries work, so it isn't an issue with
folder access, although I'm not sure how to confirm this.

Jon
 
M

Miha Markic

Hi Jon,
I don't recall going through this with Access and OLEDB. Users have full
permissions in the db. The select queries work, so it isn't an issue with
folder access, although I'm not sure how to confirm this.

Aspnet user account is very weak by default. Check the *ntfs* (file system)
security on mdb file - you'll probably see only read allowed and not write.
 
J

Jon Cosby

Miha Markic said:
Hi Jon,


Aspnet user account is very weak by default. Check the *ntfs* (file system)
security on mdb file - you'll probably see only read allowed and not write.

Where would I find this information?

Jon
 

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

Top