my dog learned polymorphism*
The moose likes JDBC and the fly likes CallableStatement 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 "CallableStatement" Watch "CallableStatement" New topic
Author

CallableStatement

K Ville
Ranch Hand

Joined: Aug 16, 2003
Posts: 58
I have written simple programs for my school projects using PreparedStatement and Statement. My teacher says that CallableStatement is for invoking a procedure from a database, in my case, SQL Server 7.0. My teacher says that CallableStatement is beyond the scope of our school guidebook. Can anyone please give me a sample on how it works? Thanks!


Thinking is the talking of the soul with itself...-Plato
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by K Ville:
I have written simple programs for my school projects using PreparedStatement and Statement. My teacher says that CallableStatement is for invoking a procedure from a database, in my case, SQL Server 7.0. My teacher says that CallableStatement is beyond the scope of our school guidebook. Can anyone please give me a sample on how it works? Thanks!

You use CallableStatement for calling store procedures or functions. Have a look at this article, it explains with an example how you can use it.


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

http://cermics.enpc.fr/~rl/cloudscape/doc/html/coredocs/jdbc10.htm


Groovy
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CallableStatement