Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.
The following page has been changed by KevinWilliams: http://wiki.apache.org/ws/Tuscany/TuscanyJava/DAS_Java_Overview/RDBDAS_Java_User_Guide/Stored_Procedures ------------------------------------------------------------------------------ - The DAS can work with stored procedures in much the same way it works with SQL statements. The follwing example shoud look familiar except a stored prcedure call replaces the typical SELECT statement: + The DAS can work with stored procedures in the same way it works with SQL statements. The follwing example shoud look familiar except that a stored prcedure call statement replaces the typical SELECT statement: + {{{ + DAS das = DAS.FACTORY.createDAS(getConnection()); + Command read = das.createCommand("{call GETALLCOMPANIES()}"); + DataObject root = read.executeQuery(); + }}} + + The predefined stored procedure "GETALLCOMPANIES" returnes a result just like "select * from company" would. There are of course stored procedures that do not return result sets and these call also be executed with the same programming model. Any arbitrary stored procedure can invoked in this way. The follwing example calls proc that deletes an identified company: + + {{{ + DAS das = DAS.FACTORY.createDAS(getConnection()); + Command delete = das.createCommand("{call DELETECUSTOMER(?)}"); + delete.setParameter(1, Integer.valueOf(1)); + delete.execute(); + }}} + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
