Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL from Java

Re: PL/SQL from Java

From: Henning Follmann <henning_at_odin.follmann-net>
Date: Tue, 31 Jul 2001 21:56:18 -0400
Message-ID: <slrn9meoe1.k6.henning@odin.follmann-net>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US