Kbase P1236: Bad Queries cause Error: Operation Must Use an Updateable Query.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
SYMPTOM(s):
Active Server Pages are being used to modify the data in the database.
The Internet Guest Account (IUSR_MACHINE) has write permissions.
The database is opened with the correct MODE for writing.
"Read Only" setting is not checked off in the Options page for the DSN in the ODBC Manager.
Error: Operation Must Use an Updateable Query.
CAUSE:
Typically, the error occurs when your script attempts to perform an UPDATE or some other action that alters the information in the database. It appears because ADO is unable to write to the database because the SQL statements violate referential integrity of the database.
The following are the most common queries that fail:
- The easiest group to deal with are queries that cannot be changed, such as crosstab, SQL pass-through, union, or update (or make) table action queries that
have UniqueValue properties set to "Yes".
- Another very common cause of the error is when the join includes linked ODBC tables that do not have unique indexes.
In these cases, there is no way for SQL to guarantee that records are unique in a table that has fields whose value changes with the query.
- If a join field is updated on the "one" side of a "one-to-many" query, it fails.
FIX:
Turn on cascading updates.
By using cascading updates, referential integrity gets delegated to the Jet engine.