Kbase P38736: Errors (223) and (196) when using widget:attribute reference
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/25/2003 |
|
Status: Unverified
SYMPTOM(s):
Errors (223) and (196) when using widget:attribute references in a WHERE clause.
Using widget and attribute references like BUFFER-FIELD and BUFFER-VALUE cause 223 and 196 errors, although the errors don't appear when using them within an ASSIGN statement.
** Incompatible data types in expression or assignment. (223)
Could not understand line <n>. (196)
CAUSE:
As an Example:
FIND FIRST customer WHERE customer.name = btth:BUFFER-FIELD('name':U):BUFFER-VALUE.
Some datatypes like BUFFER-VALUE are completely unknown at compile time. WHERE clause checking has to be more accurate than ASSIGN since we send parts of the WHERE clause to the server which has no notion of widget:attribute at all.
FIX:
People should avoid using widget:attribute references in a WHERE clause, especially BUFFER-VALUE since the datatype of that is completely unknown at compile time.
Instead, prior to the query you should assign the result to variable. Then use the variable within the WHERE clause. Like this:
bv_name = btth:BUFFER-FIELD('name':U):BUFFER-VALUE.
FIND FIRST customer WHERE customer.name = bv_name.