1 2 /* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */3 4 /*
5 ** Omni only
6 */7 createproceduresp_passthru8 @server varchar(255),/* name of remote server */9 @query varchar(255),/* language buffer to be executed remotely */10 @errcode int output,/* error number generated by query */11 @errmsg varchar(1024)output,/* error message generated by query */12 @rowcount int output/* number of rows read by the query */13 14 /*
15 ** The caller may supply up to 250 additional output arguments of the
16 ** appropriate datatypes to receive the values of successive columns
17 ** returned from the query.
18 */19 20 as21 /*
22 ** All of the processing, including setting of the return status, is
23 ** handled by the internal OmniSQL Server function "passthru()".
24 **
25 ** A status of 1 is returned if an error is detected during, either
26 ** the remote execution of the language buffer or during the processing
27 ** of the results. A status of 0 indicates a successful completion.
28 */29
exec sp_procxmode 'sp_passthru', 'AnyMode'
go
Grant Execute on sp_passthru to public
go