Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a packaged procedure from JDBC

Status
Not open for further replies.

amolso

Programmer
Sep 8, 2000
71
IN
In my normal JDBC program I execute SQL query as below

ResultSet rset = stmt.executeQuery("select empno, rpad(ename,6), deptno from emp");

However if in same program I have to access a package in Oracle and a procedure therein what is the function in java for it.
I have tried ("exec pack.proc1") in executeQuery as execute function's format. But it's not working

Amol
amolsonaikar@yahoo.com
[sig][/sig]
 
You might be able to do this with CallableStatement. There's an explanation at:


regarding stored procedures. This might help although I've never worked with Oracle so I don't know what a &quot;package&quot; is as you're referring to it. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top