Operation must use an updateable query

  • Thread starter Thread starter Jon Cosby
  • Start date Start date
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.
 
Hi Jon,

It is probably a file security issue.
Is this an aspnet app?
Does the account have enough privileges on database file?
 
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
 
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.
 
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
 
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.
 
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
 
Back
Top