angus_young_acdc
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and also after
System.Data.SqlClient.SqlC onnection Connection = new SqlConnection("");
Connection.Open()
System.Data.SqlClient.SqlC
Connection.Open()
ASKER
Thanks gauthampj, I will try it shortly and let you know
new SqlConnection(urconnection