AMT Help Files

Remote Stored Procedure

Setting up a remote stored procedure works the same way as normal stored procedures. The differences are:

  1. Only the parameters are important; they must be defined in the same order as they are defined in the stored procedure on the remote system.
  2. The reo does not define the stored procedure in the local database. This is because the stored procedure is marked as a remote procedure.
  3. In the developer, the remote database needs to be assigned to the .database property of the stored-proc component.

 

BEGIN_DEFINITIONS
VAR
    SP_TRACKING_DELETE : storedproc(SP_TRACKING_DELETE)
END_DEFINITIONS

ROUTINE PROCESS_MAIN
BEGIN_ROUTINE
    SP_TRACKING_DELETE.database := 'remotedbs'
    SP_TRACKING_DELETE.execute()
    if resok      
        sme(SP_TRACKING_DELETE.X)
    else      
        sme(getlastresult)    
    endif      
END_ROUTINE