Consultor Eletrônico



Kbase P56664: How to refresh the SmartDataBrowser records after applying a
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/28/2003
Status: Unverified

GOAL:

How to refresh the SmartDataBrowser records after applying a new WHERE clause in it.

FIX:

This solution entry provides a way to apply immediately the new WHERE clause at the SmartDataBrowser after calling the setQueryWhere function in the SmartDataObject handle.

Currently, when the WHERE clause is changed, the newly condition is not applied until the SDB is refreshed.

Open up the source code of the SmartDataBrowser and add the following 2 lines to the Definitions section:

DEFINE VARIABLE rNewRecord AS CHARACTER NO-UNDO.
DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO.

Then create an override procedure for updateRecord in the SmartDataBrowser and put the following piece of code after the RUN SUPER statement:

ASSIGN hDataSource = DYNAMIC-FUNCTION("getDataSource":U)
rNewRecord = DYNAMIC-FUNCTION("getRowident":U IN hDataSource).
DYNAMIC-FUNCTION("openQuery":U IN hDataSource).
DYNAMIC-FUNCTION("fetchRowIdent":U IN hDataSource, rNewRecord, "").