Link to home
Start Free TrialLog in
Avatar of angus_young_acdc
angus_young_acdcFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Accessing Database - Login System C#

Hey guys,

I am trying to create a more secure login for my Windows App using Visual Studio 2005 C#.  I have a MS Access Database, which has the following collums:
UserName   Password

And these are the details inside:
username1  password1
username2 password2
username3 password3
etc

I have used a DataGridView to connect the database to the program, I am unsure if that's correct.  Anyway what I want to do is the user types their username, then password.  When they click Accept (button) then I want the program to check the database, see if the user name is correct with the right password, and then return whether it is correct or not.  

After that I think I should be able to handle the permissions side.  So can anybody help me out please?  I am not great with C# so will need it explain in idiot terms lol, with as much help with the code as possible.
ASKER CERTIFIED SOLUTION
Avatar of Gautham Janardhan
Gautham Janardhan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gautham Janardhan
Gautham Janardhan

//  new SqlConnection(""); instead of this

 new SqlConnection(urconnectionstring);
and also after
System.Data.SqlClient.SqlConnection Connection = new SqlConnection("");
Connection.Open()
Avatar of angus_young_acdc

ASKER

Thanks gauthampj, I will try it shortly and let you know