I'm am searching for a few examples of stored procedures. #1 a stored procedure that return's a simple result set (or) #2 a stored procedure that performs and update (or) #3 any other examples would be appreaciated TIA, Monty6
I'm not too sure what vendor server you're interested in, but you could start with SQLServer: http://www.microsoft.com/sql/downloads/P51745.htm The online help documentation is free for downloading. The online help includes examples for all the sql commands too. I don't know if oracle or db2 doc's are free since I've never used them. cheers, Yoo-Jin.
There are some pointers available now in the Cloudscape FAQ at http://www.cloudscape.com/support/faq.jsp. Look under the SQL topic. Cloudscape uses Java as its stored procedure language, and provides Class and Method aliases as a way to make invoking them in SQL use the same SQL as other vendors. You simply define a static public method in a class, and then you can use it in SQL statements; void methods would use the CALL statements, non-void methods can also be used as expressions within statements. To call back to the database, you connect using the standard jdbc:default:connection JDBC URL, and then use JDBC to access the database, on the same connection as the caller. You can also open new connections (the Cloudscape tutorial shows examples of doing this). Hope this helps, and apologies for not finding this forum until now... Ames Carlson ames.carlson-at-informix.com
catch it before it slithers away! Oh wait, it's a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss