Wondering on Appserver procedure.

Posted by OctavioOlguin on 21-Dec-2015 10:52

Hi!.

I'm consistently doing this to get a dataset from the appserver:

1) define Business Entity.

2) put BE on appserver

3) on client call a .p routine on appserver, wich in turn instantiates BE makes the Readxxx() call to the BE, and that's it.

USING dw.dwTicketD FROM PROPATH.

{dw\dwticketd.i}

DEFINE INPUT  PARAMETER pTicket   AS INTEGER NO-UNDO.
DEFINE OUTPUT PARAMETER DATASET FOR dsdwTicketD.

DEFINE VARIABLE myTicketD AS dwTicketD NO-UNDO.


/* *************  Main Block  ************** */

myTicketD = NEW dwTicketD().

myTicketd:ReaddwTicketD(SUBSTITUTE("dwTicket.Ticket = &1", pTicket), OUTPUT dataset dsdwTicketD).

I wonder is this the best practice?  Should I instead be calling the class across the web?  Is it posible?

All Replies

Posted by Patrick Tingen on 24-Dec-2015 07:46

Nothing wrong with that I guess, but making a habit of using QUOTER and cleaning up stuff you create (myTicketD) would do you no harm and get you extra points for style.

Posted by Lieven De Foor on 04-Jan-2016 09:27

myTicketD goes out of scope at the end of the procedure, so no cleanup needed.

This thread is closed