class EnsLib.SQL.InboundProcAdapter
extends EnsLib.SQL.InboundAdapter
SQL database-polling client adapter. Repeatedly executes a sql procedure against a remote database via an ODBC- or JDBC- defined DSN (Data Source Name) and processes each resulting row.
parameter DOMAIN = "ENSEMBLE";
parameter SETTINGS = "-Query,Procedure:Data,IO:Data,OutputParamNames:Data,-DoNotInterruptResultSet,EscapedCallRequiresBracing:Data";
These are the production settings for this object
property EscapedCallRequiresBracing
as %Boolean [ InitialExpression = 1 ];
JDBC escape call syntax requires the statement to be wrapped in {}
property IO
as %String;
A text string in which each character corresponds to one of the query parameters. The character 'i' means the
corresponding parameter is an Input parameter. The character 'o' means it is an Output parameter, and 'b' means it is Both an Input
and an Output parameter. If the procedure is a function which has a return value, an 'o' should be added in front to account for the return value.
property OutputParamNames
as %String(MAXLEN="");
A comma-separated list of property names corresponding to any output parameters of the procedure.
If the procedure is a function, each parameter with an IO type of either 'o' or 'b' should have a name specified.
property Procedure
as %String(MAXLEN=1000);
The name of the procedure to be called by this Service. This should include any ? characters used to indicate parameters of the procedure, but
should not include any SQL commands (eg. Select) with the exception that the CALL command must be included if ?= is used.
Specifying preceding ?=CALL is optional if the procedure provides a RETURN (Note the Input/Output Setting must include the leading o for the return.)
For example the following are valid:
schema.proc(?,?) with Input/Output of oii - this will result in ? = CALL schema.proc(?,?)
schema.proc(?,?) with Input/Output of ii - this will result in CALL schema.proc(?,?)
? = CALL schema.proc(?,?) with Input/Output of oii - this will result in ? = CALL schema.proc(?,?)
CALL schema.proc(?,?) with Input/Output of ii - this will result in CALL schema.proc(?,?)
method OnInit()
as %Status
This user callback method is called just after %OnNew()
method OnTask()
as %Status
Copied from EnsLib.SQL.InboundAdapter, except adjusted to use ExecuteProcedureParmArray and make use of IO and returned parameters