The moose likes JDBC and Relational Databases and the fly likes Prepared Statement Vs. Callable Statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Prepared Statement Vs. Callable Statement" Watch "Prepared Statement Vs. Callable Statement" New topic
Author

Prepared Statement Vs. Callable Statement

Amit M Singh
Greenhorn

Joined: Mar 23, 2004
Posts: 2
When should the two be used?
I understand that callable statement is used for procedures but apart from that what are the advantages of callable statement over prepared statement.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9138
    
    9

CallableStatement
is the interface used to execute SQL stored procedures
[ March 23, 2004: Message edited by: Joe Ess ]

[How To Ask Questions On JavaRanch]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32501
    
214

Amit,
The real question is what are the advantages of stored procedures vs prepared statements. The main one is that stored procedures are faster because run completely on the database while prepared statements are more portable.


[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
Amit M Singh
Greenhorn

Joined: Mar 23, 2004
Posts: 2
Thanks a lot you guys.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Prepared Statement Vs. Callable Statement
 
jQuery in Action, 3rd edition