File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Executing a query using Callable statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Executing a query using Callable statement" Watch "Executing a query using Callable statement" New topic
Author

Executing a query using Callable statement

Chandra Bairi
Ranch Hand

Joined: Sep 12, 2003
Posts: 152
dear friends,
how can we execute a query using a callable statement. normally we can execute a statement using statement or prepared statement. but how can we execute a query using normal callable statement.
thanks in advance.
shekar.


Thanks,
Shekar
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Chandra,
You would have to have a stored procedure containing the query you want to run. Then you could set up the parameters to pass the query (if any), run it and get the result back.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: Executing a query using Callable statement