How to ... with MS Access DB

I need to know how to open a connection to a Access DB file on my server and query it to see if the user logging in has the correct user name and password:
here is my present code:

NOTE: This is all coded in C#


using System;
using System.Data.OleDb;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default : System.Web.UI.Page
{

//implemented code...
//Unnecessary to the problem.

protected void loginBTN_Click(object sender, EventArgs e)
{

}
}


When the user presses the Log In button (loginBTN) the callback method loginBTN_Click() is executed. This is where I need to access the DB query the DB to see if a matching user name exists and If so, see if the password matches.

I am familiar with how to implement the logic and even the query strings... I just can't figure out how to use the DB Classes to open a connection.

Any help would be great!OleDbConnection class.
 
Back
Top