Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

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

0
10 Posted

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

0

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.

0
10

A. Try this: 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 can also use the following syntax: CallableStatement cstmt = conn.prepareCall(“{call procName};”); cstmt.execute(); This code, which conforms to the Java Extended SQL specification, will work with any DBMS, not just Oracle.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.