DEFINE VARIABLE bh AS HANDLE NO-UNDO.
DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO. DEFINE VARIABLE hQuery AS HANDLE NO-UNDO. DEFINE VARIABLE tt1 AS HANDLE NO-UNDO. DEFINE FRAME BrowseFrame WITH SIZE 80 BY 10. CREATE TEMP-TABLE tt1. RUN STORED-PROC send-sql-statement LOAD-RESULT-INTO tt1 ("SELECT * from CUSTOMER"). bh = tt1:DEFAULT-BUFFER-HANDLE. CREATE QUERY hQuery. hQuery:SET-BUFFERS (bh). DISPLAY tt1:name. hQuery:QUERY-PREPARE("FOR EACH" + tt1: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(bh). ENABLE ALL WITH FRAME BrowseFrame. WAIT-FOR CLOSE OF CURRENT-WINDOW. |