Kbase P123478: OpenEdge 10.1B DataServer for MS SQL Server generates incorrect SQL syntax after using VALIDATE stat
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/05/2007 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.1B
MS SQL DataServer
Windows
SYMPTOM(s):
Executing query that INSERTs or UPDATEs a record into MS SQL Server
VALIDATE statement is used after values have been set using ASSIGN
Values are modified again after VALIDATE statement
Query fails with errors
37000: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '@P#'.
37000: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '@P46'.
37000: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
SQL statement generated by the DataServer is missing brackets:
... WHERE ((PROGRESS_RECID = @P46', ...
Errors do not occur if VALIDATE statement is removed
Same query executes correctly in previous versions of Progress / OpenEdge
CHANGE:
Upgraded to OpenEdge 10.1B
CAUSE:
This is a known issue
FIX:
Option #1
Move the VALIDATE statement so that it executes after values have been modified
Option #2
Remove the VALIDATE statement from the code