Originally posted by dip ch:
Use getTime() method of java.sql.Date to instantiate java.sql.Timestamp(long time).
Originally posted by Shiva Kumar:
Hi
1. java.sql.ResultSet RS = pstmt8.executeQuery();
2. RS.next();
3. if(RS.next())
4. {
5. ***System.out.println(RS.getInt(1))// I get the output.
6. ***ht1.put("AC_userid", new Integer(RS.getInt(1)).toString());
7. ht1.put("AC_userlogin",RS.getString(2));
8. ht1.put("AC_password",RS.getString(3));
9. ht1.put("AC_accesstype",RS.getString(4));
10. }
11. RS.close();
After Getting First String from ResultSet, not possible to get the Same once again. You did that in Line No.5 and 6. Just Remove Line No.5 and Execute. It will work.
Another thing in Line 2. you just put RS.next() suppose if your Query return more than One Row you will get the Loaded Hashtable
other wise also you will get null.
Shiva.