Consultor Eletrônico



Kbase P16068: QUERY-PREPARE method does not find selected records with SmartDataObject
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/01/2005
Status: Unverified

FACT(s) (Environment):

Progress 9.1D

SYMPTOM(s):

QUERY-PREPARE method does not find correct records with SmartDataObjects.

If QUERY-PREPARE specifies a WHERE selection criteria to select a subset of records, if those records do not appear in the current client SDO batch, then they will not be retrieved by QUERY-PREPARE and its associated QUERY-OPEN.

QUERY-PREPARE works on the current client RowObject subset of records. So, any records not copied from the server to the client by the RowObject temp table, will not be subject to the QUERY-PREPARE method.

CAUSE:

The QUERY-PREPARE method is applied to the RowObject temp table on the client side after the SDO query has executed on the server.

FIX:

Replace the QUERY-PREPARE and QUERY-OPEN methods with dynamic function calls to execute setQueryWhere and OpenQuery on the SDO, i.e.

DYNAMIC-FUNCTION('setQueryWhere':U IN h_SDO, INPUT querystring).
DYNAMIC-FUNCTION('OpenQuery':U IN h_SDO).

These will reset the query in the SDO and provide the correct records to the client.