title: ResultSet rs = st.executeQuery(sql); not working
body: <p>i use this program with jdk1.7 and java 64bit and ms access database but the problem i cannot get any result after execute the program , after checking i see the (ResultSet rs = st.executeQuery(sql);) not work while i can get (sql) value but cannot get (rs)
  note: i did all steps to connect the file with ODBC(64-bit).</p>
  
  <pre><code>package package1;
  import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;
  import java.sql.*;
  import java.awt.FlowLayout;
  import javax.swing.JPasswordField;
  public class Authentication
  {
  Connection con;
  Statement st;
  ResultSet rs;
  JFrame f = new JFrame("User Login");
  JLabel l = new JLabel("Username");
  JLabel l1 = new JLabel("Password");
  JTextField t = new JTextField(10);
  JPasswordField t1 = new JPasswordField(10);
  JButton b = new JButton("Login");
  public Authentication()
  {
  connect();
  frame();
  }
  public void connect()
  {
  
  
  final String fileName = "c:/db2.accdb";
  Connection con = null;
  try
  {  
  String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
  Class.forName(driver);
  String url = "jdbc:odbc:Driver={Microsoft Access Driver *.mdb,*.accdb)};DBQ="+fileName;
  con = DriverManager.getConnection(url,"","");
  
  }
  catch(Exception ex)
  {
  }
  }
  public void frame()
  { 
  f.setSize(400, 100);
  f.setLocationRelativeTo(null);
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  f.setVisible(true);
  JPanel p = new JPanel();
  p.add(l);
  p.add(t);
  p.add(l1);
  p.add(t1);
  p.add(b);
  f.add(p);
  b.addActionListener(new ActionListener()
  {
  public void actionPerformed(ActionEvent e)
  {
  try
  {
  String user = t.getText().trim();
  //String pass = t1.getText().trim();
  String pass = new String(t1.getPassword());
  //String sql = "select user, pass from UserPass where user='"+user+"'and pass = '"+pass+"'";
  String sql="SELECT user,pass FROM ADB1 WHERE user = '"+user+"' and pass = '"+pass+"'";
  System.out.println(sql);
  
  ResultSet rs = st.executeQuery(sql);
  
  System.out.println("rs"+rs);
  int count = 0;
  while(rs.next())
  {
  count = count +1;
  }
  if(count == 1)
  {
  JOptionPane.showMessageDialog(null, " You have successfully logged in!");
  f.setVisible(false);
  
  }
  else if (count &gt; 1)
   {
  JOptionPane.showMessageDialog(null, "Duplicate User, Access Denied! Please contact    administrator.");
  }
  else
  {
  JOptionPane.showMessageDialog(null, "Username and password is incorrect. Please try to enter your username and password.");
  }
  }
  catch(Exception ex)
  {
  }
  }
  }); 
  }
  
  }
  </code></pre>