c# - User login problems -
hi guys finishing first year year if college c# project visual studio , have problem login forum please let me know see wrong. see thing other peoples prospective![enter image description here][1] see thing wont.
thanks
private void submitbutton_click(object sender, eventargs e) { string constring = "provider=microsoft.ace.oledb.12.0;data source=c:\\users\\up_in_smoke91\\documents\\database_words.accdb;persist security info=false;"; oledbconnection connection = new oledbconnection(constring); connection.open(); oledbcommand command = new oledbcommand("select * userlogin dbusername ='" + this.textboxusername + "'and dbuserpassword= '" + this.textboxpassword +"' ",connection); oledbdatareader cmdreader = command.executereader(); int counter = 0; while (cmdreader.read()) { counter = counter + 1; } if (counter ==1) { messagebox.show("correct"); } else { messagebox.show("sorrt, incorect"); } cmdreader.close(); connection.close(); } }
Comments
Post a Comment