Kbase P17452: Corrupted queryString because ADM2 fixQueryString() converts
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/19/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1D
SYMPTOM(s):
** Incompatible data types in expression or assignment. (223)
QUERY-OPEN for query <name> requires a previous QUERY-PREPARE. (7312)
Direct call of ADM2 OpenQuery fails with a sophisticated query prepare phrase
ADM2 openquery() fails
Using European numeric format (-E)
CAUSE:
Known regression issue. OpenQuery calls a new ADM2 funtion smart.p/fixQueryString() in order to fix decimal format problems. This function happens to also convert unwanted commas used in 4GL functions like SUBSTRING or LOOKUP. As a consequence the query prepare string gets corrupted as illustrated bellow:
FOR EACH Customer NO-LOCK WHERE customer.NAME BEGINS SUBSTRING("blabla",1,1)
becomes
FOR EACH Customer NO-LOCK WHERE customer.NAME BEGINS SUBSTRING("blabla",1.1)
=> Notice the offending period in the SUBSTRING
CAUSE:
Bug# 20030116-019
FIX:
Put a space before of after the commas so fixQueryString() will not take them as decimal points. For example:
FOR EACH Customer NO-LOCK WHERE customer.NAME BEGINS SUBSTRING("blabla", 1, 1)
instead of
FOR EACH Customer NO-LOCK WHERE customer.NAME BEGINS SUBSTRING("blabla",1,1)