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

Home -> Community -> Usenet -> c.d.o.server -> Re: Executing stored procedures from java code:NEWBIE

Re: Executing stored procedures from java code:NEWBIE

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Tue, 11 Dec 2001 22:00:01 GMT
Message-ID: <3C168221.3596B4A0@rationalconcepts.com>


Hi,

   It should be a CallableStatement rather than the Statement.    I'll leave it to you to look up the api for CallableStatement.

regards,
cindy

Tom wrote:

> I am attempting to execute a stored procedure from within some java code
> i have enclosed the relevany snippet:
>
> // Create a Statement
>
> stmnt = oraConn.createStatement();
> s = "BEGIN RecoverActivity; END;" ;
> rs = stmnt.executeQuery (s);
> rs.next();
> oraRows = rs.getInt("num");
> rs.close();
>
> The stored procedure can be xecuted in pl/SQL without a problem biut I
> keep getting a problem in Java, any help about the syntax would be
> greatly appreciated
Received on Tue Dec 11 2001 - 16:00:01 CST

Original text of this message

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