consultingwerk / proparse

Proparse, forked from http://www.oehive.org/proparse/
Other
18 stars 9 forks source link

LOAD-RESULT-INTO option for RUN STORED-PROC statement is not supported. #25

Open SoftMaster opened 5 years ago

SoftMaster commented 5 years ago

Unfortunately, LOAD-RESULT-INTO option for RUN STORED-PROC statement is not supported. Syntax: https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dmsql%2Frun-stored-proc-statement-execution-with-the-loa.html%23 RUN STORED-PROC procedure-name [ [ LOAD-RESULT-INTO handle [ int = PROC-STATUS ]] [NO-ERROR] [ ( [ INPUT | OUTPUT | INPUT OUTPUT ] [ PARAM parameter-name = ] expression, ... [ INPUT | OUTPUT | INPUT OUTPUT ] [ PARAM parameter-name = ] expression) ]

Here is an example: https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dmsql/loading-result-sets-into-temp-tables.html 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.