|Apache Tuscany > Home > DAS Overview > DAS Java > DAS Java Documentation Menu > DAS Java Developer Guide > RDB DAS Java > RDB DAS - User Guide > WorkingWithStoredProcedures||User List | Dev List | Issue Tracker|
The DAS can work with stored procedures in the same way it works with SQL statements. The following example should look familiar except that a stored prcedure call statement replaces the typical SELECT statement:
The predefined stored procedure "GETALLCOMPANIES" returnes a result just like "select * from company" would. There are, however, procedures that do not return
Stored procedures may also provide IN/OUT and OUT parameters. The following illustrates the use of a stored procedure that returns a result set as well as an OUT parameter:
This example makes use of a configuration file to define the command including the OUT parameter:
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.