This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes testing a stored procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "testing a stored procedure" Watch "testing a stored procedure" New topic

testing a stored procedure

sdeep anand

Joined: Jul 16, 2006
Posts: 7
I have this stored proceure. I inserted data into the table. I want to get data back and this is the stored procedure. I tested using java. My method runs without errors but i dont get any data when I print out. I want to test this procedure in toad to see if it is getting data at all.
linesetid =1
fublineid is null for now

how do I test this procedure in toad and see if it is really getting data.

[ August 14, 2006: Message edited by: Lasse Koskela ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Moving to the Engineering-->Testing Forum

Consultant, Sima Solutions
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32635

Moving to JDBC as I think people there are more likely to have used TOAD:
I want to test this procedure in toad to see if it is getting data at all.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
I spent some time trying to define variable in Toad but without any success. Looks like Toad doesn't support SQL* Plus features like define/print/variable.

One way you can test the procedure is to execute the procedure in the anonymous block by defining local variables for the return values and using dbms_output.put_line. This is more work than using SQL* Plus. The other way is to debug (using break points) the procedure itself and just make a call to the procedure.
I agree. Here's the link:
subject: testing a stored procedure
It's not a secret anymore!