craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > JDBC/Database Issues Post New Topic   Post A Reply
Problem Calling Stored Proc printer friendly version
next newest post | next oldest post
Author Messages
jfribo
Private First Class

Gender: Male
Location: Florida
Registered: Oct 2007
Status: Offline
Posts: 10

Click here to see the profile for jfribo Send email to jfribo Find more posts by jfribo Edit or delete this message Reply w/Quote
Posted Thursday, October 25, 2007 @ 13:11:58  

I am evaluating the product and must have stored proc support. When I call the procedure I get invalid SQL statement. This is an oracle 8i db and we will be upgrading to 10g.

gt.getTable().setSelectSql("WB_TITLE_2_DEED, 2007, 000001");

This is how I call it normally;
connection.setProc("WB_TITLE_2_DEED",3);
vctArgs = connection.setProcParams("int=" + str_title_year.trim() + ";" + "int=" + str_title_seq.trim());
vdeeds = connection.executeProc(1,vctArgs);

Any suggestions?

[Edit by jfribo on Thursday, October 25, 2007 @ 13:33:00]

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Thursday, October 25, 2007 @ 20:05:38  

Please refer this url
http://quicktable.org/discussion/cutecast/cutecast.pl?forum=2&thread=444

Probably you need to use
dbtable.setSelectSql("{call WB_TITLE_2_DEED (2007, 000001)}");

You can also try
dbtable.setSelectSql("begin WB_TITLE_2_DEED (2007, 000001); end;");

jfribo
Unregistered
Edit or delete this message Reply w/Quote
Posted Saturday, October 27, 2007 @ 09:01:00  

Thanks for the reply. It's better. Now it seems to be calling the procedure but I get the following error.

TitleDeedTab EXCEPTION - java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'WB_TITLE_2_DEED'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

The proc has two ints and a cursor of course. I'm not sure if it wants some type of cursor. Sorry to bother you with this but I love product, I just have to get this to work before I buy it. There really is not documention for stored procs except the one line is setselectsql which really doesn't seem right from what you and I are trying to do.

Any suggestions would be appreciated.

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, October 29, 2007 @ 21:37:42  

You really need to refer your JDBC driver documentation.

whichever sql statements you use fro statement.executeQuery(sql) should work for setSelectSql()

Other options is to call the stored procedure your way
connection.setProc("WB_TITLE_2_DEED",3);
vctArgs = connection.setProcParams("int=" + str_title_year.trim() + ";" + "int=" + str_title_seq.trim());
vdeeds = connection.executeProc(1,vctArgs);

finally just pass the Resultset object to quicktable using dbtable.refresh(yourresultset);

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios