Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Calling stored procedures from Java Servlet

 
Donna Reschke
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Report post to moderator
If I need to call a stored procedure with 6 input parameters and 6 output parameters, how would I do this? Would it look like this?...
cstmt = con.prepareCall("{?, ?, ?, ?, ?, ? = CALL MKTDS22B (?, ?, ?, ?, ?, ?)}");
or this?...
cstmt = con.prepareCall("(CALL MKTDS22B (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?))" );
Please help! Thanks!
 
Gerry Giese
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Report post to moderator
Donna,
Try the JDBC Documentation at java.sun.com.
You'll probably get a much better response if you post in the JDBC forum instead of the Servlet forum, since this question has nothing to do with Servlets. Bartender, can you move it? Also, you should try searching the JDBC forum for similar questions that may have answers already.
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Report post to moderator
Calling a stored procedure from a servlet is a bad idea and usually indicates a poor design. You may want to add a layer of abstraction between your servlet and your data access calls, such as a data access object.
SAF
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a cross post in the JDBC forum.
 
    Bookmark Topic Watch Topic
  • New Topic