Operation must use an updatable query

  • Thread starter Thread starter Joe Au
  • Start date Start date
J

Joe Au

I create a ASP.Net Web Form which use oledb connection to a access database
and insert a simple record (no calculation fields, just text fields) into a
table. Either using append query or insert statement, I got the error
"Operation must use an updatable query". Can anyone fix it for me? Thanks a
lot.

Joe.
 
Do you have a primary key defined for the table in question? I believe it's
mandatory in order for tables to be updatable using OleDB.
 
Hi Joe,

SYMPTOMS
When you run an update query in a database which has been converted to
Microsoft Access 97, you may receive the following error message:

Operation must use an updatable query.
This occurs even if the update query ran without the error in Microsoft
Access 7.0 or earlier.
CAUSE
The update query is based on a select query. In Microsoft Access 7.0 or
earlier, a select query returns only unique records by default; the SQL
statement that defines the query contains the predicate DISTINCTROW.
However, a select query in Microsoft Access 97 does not contain DISTINCTROW
by default, and all records are returned, even if an entire record is a
duplicate of another record in the query results.
RESOLUTION
Open the update query in SQL view and remove the word "DISTINCTROW" from
the SQL statement. Then run the update query again.


For Further Information: Microsoft Knowledge Base Article - 163054
Microsoft Knowledge Base Article - 116142

Please let me know has this helped You...
Thank You...
Raghu...
 
Back
Top