This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!