aspose file tools
The moose likes JDBC and the fly likes calling Stored Procedure in DB2 thru JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "calling Stored Procedure in DB2 thru JDBC" Watch "calling Stored Procedure in DB2 thru JDBC" New topic
Author

calling Stored Procedure in DB2 thru JDBC

Deepika Wadhwa
Ranch Hand

Joined: Aug 05, 2000
Posts: 57
What is better approach for executing the stored procedure if we use either Prepared Statement or Callable statement ?

Is there any performance difference ???

Thanks in advance
Deepika
VS Prapoorna
Greenhorn

Joined: Oct 13, 2001
Posts: 22
Hi
Use a PreparedStatement when you execute the same statement more than once.
Use CallableStatement to execute stored procedures. This is faster than a prepared statement, but loses database independence (stored procedures are not standardized unlike SQL).
I think this explanation might helpful.
Regards,
Sarada Prapoorna.V
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Prapoorna"
Your name does not comply with the JavaRanch naming standard described at http://www.javaranch.com/name.jsp
I also notice that you have changed your name from a valid name to this invalid name. Please change it back, since your account will be locked otherwise.
Dave
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: calling Stored Procedure in DB2 thru JDBC
 
Similar Threads
When is exclusive lock released
MVC or DAO?
External tables and CallableStatement
Statement & PreparedStatement
is string a wrapper class?