Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

DAS das = DAS.FACTORY.createDAS(getConnection());
Command delete = das.createCommand("
{call DELETECUSTOMER(?)(question)}
");
delete.setParameter(1, 1234);
delete.execute();

...

This example makes use of a configuration file to define the command including the OUT parameter:

No Format

<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

...

   <Command name="getNamedCustomers" SQL="

...

{call GETNAMEDCUSTOMERS(?,?)}

...

" kind="procedure">

...



     <Parameter direction="IN" columnType="commonj.sdo.String"/>

...



     <Parameter direction="OUT" columnType="commonj.sdo.IntObject"/>

...



   </Command>

...



 </Config>

This stored procedure is defined such that the first argument provides a name to match when looking for customers and the second argument is an OUT parameter and providing the number of customers that match the provided name. The proc also returns the list of matching Customers.