Hi all.
PreparedStatements are the correct means for executing a stored procedure,
but in my current case I am limited to a plain Statement object. Is there a
SQL string that would allow a plain statement to execute a simple non-parameterized
procedure? Eg:
Statement s = con.createStatement();
s.execute("execute myProcedureName" );
This doesn't work like SQL-PLUS... The driver just sends the "execute myProcedureName"
to the DBMS and then it fails with a ORA-00900: invalid SQL statement.
Thanks,
Joe Weinstein at BEA
Joe Weinstein - 29 Mar 2005 19:04 GMT
> Hi all.
> PreparedStatements are the correct means for executing a stored
[quoted text clipped - 13 lines]
> Thanks,
> Joe Weinstein at BEA
Hi. FYI, I got the answer that I had long forgotten, from David Rolfe
of Orinda Software:
s.execute("BEGIN myProcedureName; END;");
Joe