login prob

Discussion in 'ASP General' started by josephrthomas, Dec 29, 2003.

  1. hi..i am trying to make a login page and i am using access
    table..
    when the user enters his userid and password i want to
    check the password from the table..

    if any user with the userID that is entered exists i want
    to find the correspoding password for him else i want to
    throw an error saying no such user exists..

    i know how to access the MS Access table and stuff..but
    now what i want to do is to take the userid and see if
    there is any userid such as the one existing, and if there
    is i want to take out the password for that user ID..

    what i am trying to do is as below.

    The prob is, once i get the data in the dataset, how do i
    take out the password??

    i mean is there is any way i can assign the derieved
    password to strPwd???
    <code>
    Private Sub cmdLogin_Click(ByVal sender As System.Object,
    ByVal e As System.EventArgs) Handles cmdFilter.Click

    Dim strUserID As String = txtUserID.Text
    Dim strPwd as string
    Dim conn As OleDbConnection
    Dim dsn As String =
    ConfigurationSettings.AppSettings("ConnectionString")

    conn = New OleDbConnection(dsn)

    Try
    Dim da As OleDbDataAdapter
    da = New OleDbDataAdapter("Select
    [Password] from Customer where UserID ='" & strUserID
    & "'", conn)

    Dim ds As DataSet = New DataSet()
    da.Fill(ds, "Customer")
    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    'HOW TO GET THE PASSWORD FROM THE
    DATASET?????????????
    'HOW TO ASSIGN THE PASSWORD IN THE DATASET
    TO STRING strPwd???????
    'strPwd = ???????????????
    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    Finally
    conn.Dispose()
    End Try
    End Sub
    </code>
    can someone pls help me out????
    is there any way i can take out the password that is
    stored in the dataset and assign it to strPwd??
    also how do i know that the userID could not be found in
    the database and the dataset has nothing stored inside so
    that i can tell the user that NO SUCH USER EXISTS!
    can someone pls help me....
    tks a lot...
    any help deeply appreciated..
    tks
    josephrthomas, Dec 29, 2003
    #1
    1. Advertising

  2. not asp but ASP.NET with VB.NET

    OOPS!!!
    i forgot to mention....
    i am using ASP.NET with VB.NET...
    can u pls help???
    tks...
    JosephRThomas, Dec 29, 2003
    #2
    1. Advertising

  3. josephrthomas

    Bob Barrows Guest

    Re: not asp but ASP.NET with VB.NET

    JosephRThomas wrote:
    > OOPS!!!
    > i forgot to mention....
    > i am using ASP.NET with VB.NET...
    > can u pls help???
    > tks...


    This is a classic asp newsgroup. While you may be lucky enough to find a
    dotnet-savvy person here who can answer your question, you can eliminate the
    luck factor by posting your question to an appropriate group. I suggest
    microsoft.public.dotnet.framework.aspnet. (the key word is dotnet)

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows, Dec 29, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William F. Robertson, Jr.
    Replies:
    0
    Views:
    428
    William F. Robertson, Jr.
    Jul 2, 2003
  2. Hermit Dave

    Forms Login Page Not Login Out

    Hermit Dave, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    453
    Hermit Dave
    Jan 13, 2004
  3. Nans
    Replies:
    2
    Views:
    20,070
    Martin Marinov
    Jun 17, 2004
  4. =?Utf-8?B?Z2FyaWJhbGRp?=
    Replies:
    2
    Views:
    4,902
    =?Utf-8?B?Z2FyaWJhbGRp?=
    Feb 25, 2005
  5. NickyW

    can't login! - authentication prob.

    NickyW, Aug 28, 2003, in forum: ASP General
    Replies:
    2
    Views:
    76
    NickyW
    Aug 28, 2003
Loading...

Share This Page