DEFINE VARIABLE hSendSQL AS HANDLE NO-UNDO EXTENT 1.
DEFINE VARIABLE phDataSet AS HANDLE NO-UNDO. DEFINE VARIABLE rid-1 AS ROWID NO-UNDO. DEFINE VARIABLE rid-2 AS ROWID NO-UNDO. DEFINE TEMP-TABLE ttCustomer LIKE Sports.Customer FIELD rRecid AS ROWID. hSendSQL[1] = TEMP-TABLE ttCust:HANDLE. DEFINE DATASET dsCustomer FOR ttCustomer. DEFINE QUERY qCustomer FOR Customer. phDataSet = DATASET dsCust:HANDLE. phDataSet:SET-CALLBACK-PROCEDURE ("BEFORE-FILL", "preDataSetFill", THIS-PROCEDURE). DEFINE DATA-SOURCE srcCustomer FOR QUERY qCustomer. BUFFER ttCustomer:HANDLE:ATTACH-DATA-SOURCE (DATA-SOURCE srcCustomer:HANDLE,?,?,?). DATASET dsCustomer:FILL(). FIND FIRST customer WHERE customer.custnum = 1 NO-LOCK. rid-1 = ROWID(customer). FIND FIRST ttCustomer WHERE ttCustomer.custnum = 1 NO-LOCK. rid-2 = ttCustomer.rRecid. IF rid-1 <> rid-2 THEN MESSAGE "The same record but different ROWID's". IF rid-1=rid-2 THEN MESSAGE "Congratulations - we have the same ROWID's". MESSAGE STRING(ttCustomer.rRecid) VIEW-AS ALERT-BOX. |