How to connect Java 8 with MS Access? -
i facing issue making login page in java using ms access database. not getting username , password ms access database.
try { string user=t.gettext().trim(); string pass=t1.gettext().trim(); class.forname("sun.jdbc.odbc.jdbcodbcdriver"); connection con1=drivermanager.getconnection("jdbc:odbc:balogin"); statement stat; stat=con1.createstatement(); resultset rs=stat.executequery("select * table1 user='"+user+"' , pass='"+pass+"'"); system.out.println("select * table1 user='"+user+"' , pass='"+pass+"'"); int count=0; while(rs.next()) { {count=count+1;} if(count==1) { joptionpane.showmessagedialog(null,"user found,access granted"); controlpanel cp1=new controlpanel(); cp1.display(); } else { joptionpane.showmessagedialog(null,"user not found"); } } }
the jdbc-odbc bridge obsolete , has been removed java 8, .getconnection("jdbc:odbc:...
not going work. alternative see
Comments
Post a Comment