Invokes a method upon a set of given values and writes its result into
the database, by using a stored procedure or an UPDATE/INSERT
command.
inputQuery
. If the underlying component contains
several methods named meethodName
, the one that fits best the number
columns returned is chosen.methodName
, as
an array of values.storedProcedure
flag is set, the outputQuery is run as a stored
procedure, otherwise this method will treat it as an SQL statement.methodName
to. If only one result is expected, pass in
a String
. If more than one value is supposed to be returned by
methodName
, pass in a String
array representing the
names of the Input parameters of the output query.true
, the output query is run
as a stored procedure, if false
the output query will be invoked
as an ordinary SQL statement.
Additionally, you should specify the named parameters where to place the result
returned by methodName
, either as a String
, or an array of
String
objects.
Exception Type | Condition |
---|---|
ADOMediatorException | Thrown to indicate run-time errors. |
The following piece of code invokes method MyMethod
with two
double
-type parameters and writes the results in the database
using an UPDATE
statement.
ado.Update ("MyMethod", new Object[] {500, 5.51}, "UPDATE CUSTOMER SET MONEY=@MONEY WHERE C_ID='00001'", "@MONEY", false);
ADOMediator Class | WebCab.Libraries.Statistics.PDistributions.ADO Namespace