I am developing standalone GUI bank application
in the log in window the action i am trying to perform for the jButton1 is that when the user enters the UserId and Password and hit the Submit Button the following is expected
1)the database i am using is MsAccess 2007
2) when user hits the submit button then userid and password should be search and if it is there then user gets to next window
3)otherwise a dialog box should be displayed
But the result i am getting
1) when the user enters the UserId and Password and hit the Submit Button i am not getting the desired output because i think the sql query i am using is not executing at all.
SQL Query----("Select UserID,Password "+"From LoginInformation where UserID='"+i+"' and Password='"+j+"'");
kindly suggest on this and also the flaw if any is there in query
2.) Don't add string using + for sql statement parameters. Use PreparedStatement parameters instead to set the values.
3.) Read up on swing and threading to find out how to use swing without performing long running or IO operations on the EDT.