Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Executing stored procedures from java code:NEWBIE
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