Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL from Java
On Tue, 31 Jul 2001 23:07:24 GMT, Brian Janko
<brian_at_jankoNOnet.SPAMcom.INVALID> wrote:
>How do you execute a PL/SQL block from a Java Program?
>
>Thanks,
>Brian
>
The following lines should give you a rough understanding:
...
java.sql.CallableStatement cstmt;
String stmt = "{ CALL PACKAGE.PROCEDURE(?,?,?)}";
cstmt = connection.prepareCall(stmt);
cstmt.setString(1, stringParameter); cstmt.setInt(2, intParameter); sctmt.setFloat(3, floatParameter);
cstmt.executeUpdate();
...
Henning
-- Henning Follmann 8 Jane Road New Providence, NJ 07974 Tel.: +1 908 464 8972 H.Follmann_at_gmx.de -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =-----Received on Tue Jul 31 2001 - 20:56:18 CDT