2
Answers

Using Access Database for Login authentication ?!?!

Ask a question
postmatt

postmatt

19y
3.7k
1
I am attempting to use C# in ASP.NET Webmatrix to connect to an Acess database and check for a users details to check they are members. I have managed to write the following but have no idea how much of it is correct, any asssistance would be welcome. string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("magazine.mdb"); OleDbConnection connection = new OleDbConnection(connectionString); connection.Open(); OleDbDataReader dataReader; OleDbCommand cmd = new OleDbCommand("SELECT * FROM Subscribers WHERE UserId='"username"' AND UserPassword='"password"'", connection); dataReader = cmd.ExecuteReader(); The username and password strings in the OleDbCommand line have been created as reading from a text input box on an html form.

Answers (2)