Does anyone know why Progress/OE ignores the 'Fields' clause in a 'for' statement when 'rowid' expression is used in the where clause of that 'for' statement?
DEFINE VARIABLE yy AS ROWID NO-UNDO.
FIND FIRST jol NO-LOCK.
yy = rowid(jol).
FOR FIRST jol FIELDS(jol.xxxxjob) WHERE ROWId(jol) = yy NO-LOCK:
MESSAGE jol.mfgd-order VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
I don't get any compilation / runtime error when I execute the above code. The field 'jol.xxxxjob' specified in 'fields' clause does not exist in the database. Moreover I dont get a 'missing field' for 'jol.mfgd-order' specified in the message statement.
Progress / OE seems to be ignoring the fields clause and fetches all the fields when using 'ROWID' in the 'where' expression though it is with a 'NO-LOCK'.
I know that 'Fields' clause is ignored when using 'exclusive' locks.
Could anyone explain this?
Are you using a client/server connection to the database (-H -S parameter)? The field clause is also ignored for local connections.
Are you saying that the field clause is respected when using a different selection (on a key field, not the ROWID)?
Yes I am using a client/server connection to the database (-H -S parameter).
Yes the fields clause is respected when using a different selection (on a key field, not the ROWID) or if there is no 'where' clause in the for statement.