Kbase 20149: MODE setting causes Error: Operation Must Use an Updateable Query
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
SYMPTOM(s):
Active Server Pages are being used to modify the data in the database.
Error: Operation Must Use an Updateable Query.
"Read Only" setting is not checked off in the Options page for the DSN in the ODBC Manager.
SQL statements do not violate referential integrity of the database.
The Internet Guest Account (IUSR_MACHINE) has write permissions.
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 database is not opened with the correct MODE for writing.
FIX:
Perform the Open on the connection object and use the following Mode property to indicate the following permissions on the connection:
SQL = "UPDATE Products Set UnitPrice = 2;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode = 3 '3 = adModeReadWrite
Conn.Open "myDSN"
Conn.Execute(SQL)
Conn.Close