Pass dynamic query buffer to other procedure.

KleineCuypie

New Member
Hello guys,

I have a problem by passing a buffer or handle from a dynamic query buffer to another procedure.

Code:
DEFINE VARIABLE queryCustomer AS HANDLE     NO-UNDO.
CREATE QUERY queryCustomer. 
queryCustomer:ADD-BUFFER(htt-customer).


queryCustomer:QUERY-PREPARE("for each " + htt-customer:NAME). /*htt-customer is a buffer handle from a temp-table in my dataset*/
queryCustomer:QUERY-OPEN().
queryCustomer:GET-FIRST().


REPEAT WHILE NOT queryEmployment:QUERY-OFF-END:
      RUN testProcedure (htt-customer:BUFFER-HANDLE) /* Also tried BUFFER htt-customer:HANDLE or DEFAULT-BUFFER-HANDLE etc */
END.

PROCEDURE testProcedure:
     DEFINE INPUT PARAMETER b_customer AS HANDLE NO-UNDO. /* Also tried --> DEFINE PARAMETER BUFFER b_customer FOR htt-customer:NAME */
     MESSAGE b_customer::name
          VIEW-AS.....
END PROCEDURE.

Can anyone help me with this one please? Thanks!

Greetz Tim
 

KleineCuypie

New Member
Tsss, topic can be closed.

I found the right solution. The next thing I tried was:
Code:
[COLOR=#3E3E3E][FONT=monospace]RUN testProcedure (htt-customer:HANDLE)[/FONT][/COLOR]
and it looks like he know it was already a buffer, great job progress I didn't expect that. :)

Greetz Tim.
 
Top