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

manipulating access database java without odbc


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -