Hi,

this my jsp where I using  storesd procedure ps_selectPerson
Can you tell me  how to use prepareCall method?
Thanks for help

Martin

<HTML>
<BODY>
<%@ page isErrorPage="true" %>
<%@ page import="java.sql.*;" %>
<%@ page import="Cannes.Tools.connexionPool.*;" %>
<%!
Connexion cx;
Connection con;
CallableStatement cstmt;
ResultSet rs;
%>
      <%
       try{
      cx=new Connexion();
      con=cx.getConnexion();
      cstmt=con.prepareCall("{call ps_selectPerson(?)}");
      cstmt.setInt(1,2);
      ResultSet rs=cstmt.executeQuery();
      System.out.println("rs="+rs);
     while(rs.next()){%>
      <br>Login=<%=rs.getString("LOGIN")%>;
     <%}
     }catch(Exception e)
     {e.getMessage();}
     finally{
      try{
       if(con!=null) con.close();
      }catch(Exception ignored){}
     }


  %>

 </BODY>
</HTML>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to