× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Stored Procedures
  • From: cujo@xxxxxxxxxx
  • Date: Thu, 22 Jul 1999 15:21:28 -0500

I will offer up some information on this as I have done a fair amount of playing
with SQL Stored Procedures and Java.  Hope the following helps:

The following example program shows:
1) The syntax of creating an SQL Stored Procedure that uses serveral different
types of parameters.
2) How to compile this procedure using Java/JDBC
3) How to call the stored procedure, setting/registering parameters for it
4) How to get an output parameter from the stored procedure.
5) How to get rid of the stored procedure.

This program has been tested on a v4r4 system and is designed to use the AS/400
Developer Kit for java "native" JDBC driver.  There could be some issues with it
as it was thrown together from pieced of code from various places.  It seems to
be fully funtional to the point that it needs to be however.

I will try to get together an example that shows the use of multiple result sets
 from an SQL Stored Procedure and put that out here as well.

As far as the control flow structures for SQL Procedures, I assume they are
pretty self-explanitory.

Regards,

Richard D. Dettinger
AS/400 Native JDBC Driver Team

"I don't see much sense in that," said Rabbit.
"No," said Pooh humbly, "there isn't. But there was going to be when I began
      it. It's just that something happened to it along the way."



enord@ORIENTAL.COM on 07/22/99 12:48:30 PM

Please respond to JAVA400-L@midrange.com

To:   JAVA400-L@midrange.com
cc:
Subject:  Stored Procedures







We are currently writing are main system in Java.  We have SQL statements inside
our class files.  We would like to create pure SQL stored procedures on the 400.
Has anyone created these and could someone please give me an example of the
code.  I have found a little on IBM's web site, but I don't think it is very
good.  What should the source type be and what are the steps to compile this.

Thank you in advance for all you help
Erik Nord
Oriental Trading Company
Omaha, NE





+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---



+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.