• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling Oracle Stored Procedure

 
Mike Firkser
Ranch Hand
Posts: 249
Java Oracle PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help will be appreciated. I'm getting nowhere on this. Oracle10 with Weblogic Server.

This proc works when accessing through Crystal Reports.

First the proc spec:



Now my Java code:




The results I'm getting is:
SQLException line 44: java.sql.SQLException: ORA-06553: PLEASE-306: wrong number or types of arguments in call to 'LAB_ORG_LISTING'

For some reason I can't put in P L S (without spaces) so I put in PLEASE


If I change the registerOutputparameter to

I get:

SQLException line 44: java.sql.SQLException: Cannot perform fetch on a PLSQL statement: next


Thanks,

Mike
 
Siva Masilamani
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your procedure "lab_org_cur" is not just OUT parameter,it is IN also which means you need to send the cursor type as input.

You store procedure expects 4 input parameter but only 3 have been provided in your code.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And this piece is not completely as per specs and tutorial.

I don't see your "{}".
 
Mike Firkser
Ranch Hand
Posts: 249
Java Oracle PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't seem to find any method to set the parameter type as an INOUT type. I just see registerOutParameter.
 
Mike Firkser
Ranch Hand
Posts: 249
Java Oracle PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like I got it working!!!

Thanks for your help.

Mike
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,

Can you share your solution with us? It might help future Ranchers that have similar issues.
 
Mike Firkser
Ranch Hand
Posts: 249
Java Oracle PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my final code with some comments:

Again, thanks for all your help.

 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic