DEFINE VARIABLE bhCustomer AS HANDLE NO-UNDO.
DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO. DEFINE VARIABLE hQuery AS HANDLE NO-UNDO. DEFINE VARIABLE ttCustomer AS HANDLE NO-UNDO. DEFINE FRAME BrowseFrame WITH SIZE 80 BY 10. CREATE TEMP-TABLE ttCustomer. RUN STORED-PROC send-sql-statement LOAD-RESULT-INTO ttCustomer ("SELECT * from CUSTOMER"). bhCustomer = ttCustomer:DEFAULT-BUFFER-HANDLE. CREATE QUERY hQuery. hQuery:SET-BUFFERS (bhCustomer). DISPLAY ttCustomer:Name. hQuery:QUERY-PREPARE("FOR EACH" + ttCustomer:Name). hQuery:QUERY-OPEN. CREATE BROWSE hBrowse ASSIGN ROW = 1 COL = 1 WIDTH = 79 DOWN = 10 FRAME = FRAME BrowseFrame:HANDLE QUERY = hQuery SENSITIVE = TRUE SEPARATORS = TRUE ROW-MARKERS = FALSE VISIBLE = TRUE. hBrowse:ADD-COLUMNS-FROM(bhCustomer). ENABLE ALL WITH FRAME BrowseFrame. WAIT-FOR CLOSE OF CURRENT-WINDOW. |