hai
 I am using jsp with JRUN I am not able to acess the database pl help me debugging this code
 
<% @ page import="java.io.*","java.io.*,java.lang.*,java.sql.*,javax.sevlet.*,javax.servlet.http.*"%>
<! String UserId, Password;%>
<%
 
 UserId = request.getParameter("UserID");
 Password = repuest.getParameter("Password");
        out.println("hdhdh"+UserId);
        out.println("jhdjd"+Password);
      try
       { file://try
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          Connection myConn=DriverManager.getConnection("jdbc:odbc:bbi","bbi","bbi");
          Statement  mystmt=myconn.createStatement();
          ResultSet rs;
          rs = mystmt.executeQuery ( "Select count (*) from usertab where Usrid ='" +UserId+ "' and Usrpw='" + Password + "'" );
          rs.next();
          int cnt=rs.getInt(1);
   if(cnt > 0)
    {
    cnt=1;      
    }
   else
     cnt=0;
 }
 catch()
 {}
 
%>
thank in advance
rajesh

Reply via email to