winforms Login

I would like to ask a question I am new to vb 2005 I would like to set up the login form to autenticate to the sql database. i have a table called user which has the username and password and i can not find the code to authenticate to that table
and then would open a new form.
Please any help would be Great




Answer this question

winforms Login

  • Mr. Hanky

    Greg,
    Thanks for your response I guess I will need to reword it
    What I am trying to do is I have the login form and created a database. The database has a table called "user with username and password", what I am looking for is the code to do this.
        In the database table called "user in username (jsmith) Password" (jsmith) when the user types in the login form user name (Jsmith) and then the password (jsmith) Click ok, it goes to the database, looks at the table user field, username and password. Checks the names against those names and says ok form 2, show else msgbox "incorrect user name or password" I have done this in VB6 but I am not quite getting it in vb2005.

  • MightyDubCats

     R2ks wrote:
    The database has a table called "user with username and password"

    You're kidding right   I would just name it 'users'.

    Regardless, it is basically the same way in 2005.  Please post your code so we can see where you might be going wrong.

    Greg

  • dsi

    If you are looking for something automatic (at least the concept) like in Webforms, you will not find it.  You must write the code yourself to query the database, check the login and the redirect them using .Show or .ShowDialog to the new window.

    Hope this helps,
    Greg

  • winforms Login