Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access Stored Procedures in MSSQL and MySQL

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic