+ 1

Capture user id

Hello, im making a web application with NetBeans and im trying to register the system logs into a database. But im not sucessful to get the user id after login. Could anyone help me?

1st May 2018, 5:29 PM
Rafael Leonardo De Lima
Rafael Leonardo De Lima - avatar
1 Answer
0
try{   Class.forName("oracle.jdbc.drivser.OracleDriver");   Connection con=DriverManager.getConnection(   "jdbc:oracle:thin:@localhost:1521:xe","system","oracle");          PreparedStatement ps=con.prepareStatement(   "select * from userreg where name=? and pass=?");   ps.setString(1,name);   ps.setString(2,pass);          ResultSet rs=ps.executeQuery();   status=rs.next();              }catch(Exception e){System.out.println(e);}   return status;   }   }  
22nd Jul 2020, 2:03 PM
Devendra Singh Khati
Devendra Singh Khati - avatar