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 Access Stored Procedures in MSSQL and MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Access Stored Procedures in MSSQL and MySQL" Watch "Access Stored Procedures in MSSQL and MySQL" New topic
Author

Access Stored Procedures in MSSQL and MySQL

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi, I'm sorry if this is a little vampiric... Please tell me how to access MSSQL or MySQL and MySQL stored procedures using JDBC. Thanks a lot guys!


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
vampiric?!?

Anyway CallableStatement is what you want. So instead of the Connection.prepareStatement method your code was using you would use Connection.prepareCall instead.

Look at http://java.sun.com/docs/books/tutorial/jdbc/basics/storedprocedures.html and consult the documentation for your database/driver for more information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access Stored Procedures in MSSQL and MySQL
 
Similar Threads
changing from MSSQL to MySQL
IDENTITY_INSERT
Looking for Java /MySQL /Jboss Developer 4-28-04
sql query based on variable number of input parameters
stored procedure doubt??