Answers

Question and Answer:

  Home  BEA Weblogic

⟩ How do I call Oracle stored procedures that take no parameters?

Here is what we use that works:

CallableStatement cstmt = conn.prepareCall("Begin procName;

END;");

cstmt.execute();

where procName is the name of an Oracle stored procedure. This is standard Oracle SQL syntax that works with any Oracle DBMS. You might also use the following syntax:

CallableStatement cstmt = conn.prepareCall("{call procName};");

cstmt.execute();

This code, which conforms to the Java Extended SQL spec, will work with any DBMS, not just Oracle.

 206 views

More Questions for you: