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, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to