Hi all

I'm having trouble with some of the login controls for my website. I've successfully set it up so when a user registers it enters the details into an Access database.

I'm now trying to get the login to work but can't see how to implement this.

I've had a go at some code but I'm not sure what I need to add to it to get it working

Here's My code

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

public partial class Home : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)

    protected void Button1_Click(object sender, EventArgs e)
        OleDbConnection a = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=I:/skylimos/App_Data/limohire.mdb");
        string dbcommand = "SELECT * FROM customer_TBL WHERE [email] = '" + TextBox1.Text + "' AND [password] = '" + TextBox2.Text + "'";
        OleDbDataAdapter b = new OleDbDataAdapter(dbcommand, a); DataSet dset = new DataSet();


Any help is appreciated, cheers

Recommended Answers

Here is a link with the required login.
Although it uses SqlConnection and SqlCommand...but you can simply replace that using OleDB..



Jump to Post

All 2 Replies

very helpful, cheers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.