Results 1 to 5 of 5

Thread: [RESOLVED] [02/03] Login form!

  1. #1

    Thread Starter
    Lively Member rguifarro's Avatar
    Join Date
    Aug 2006
    Location
    Central America
    Posts
    73

    Resolved [RESOLVED] [02/03] Login form!

    hey!

    the idea is to do a winform where the user can change his username and password and when this is done update it onto the table. could you help me i'm new in vb.net, i'm usesing sql server 2000.

    thanx!

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [02/03] Login form!

    What do you have so far?

  3. #3

    Thread Starter
    Lively Member rguifarro's Avatar
    Join Date
    Aug 2006
    Location
    Central America
    Posts
    73

    Re: [02/03] Login form!

    hi there!

    so far I have just done the login form where you put your name and password and that info is compare to the one in the table and it works fine but I need that part where the user can change his password.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [02/03] Login form!

    Well generally a user can change their password ONLY after a successful login using the existing one, however it is good practice to ask them for the password again when changing.

    So you would want a form with a field for old password, new password, and a confirmation of new password.

    Validation you would need to perform before making the DB update would be to

    1) determine that the existing password is valid
    2) determine that the entered new password, and confirmation of it, match.

    basically as far as the actual update to the DB, it would be a simple UPDATE SQL statement...

    VB Code:
    1. UPDATE tblMyTable SET [UserPassword] = '" & NewPassword & "' WHERE [UserID] = '" & UserID & "'"
    where
    tblMyTable is your table name
    [UserPassword] is the field in the DB for their password
    NewPassword is a string variable containing the new password
    [UserID] is the field in the DB for their ID
    UserID is a string variable containing their UserID

  5. #5

    Thread Starter
    Lively Member rguifarro's Avatar
    Join Date
    Aug 2006
    Location
    Central America
    Posts
    73

    Re: [02/03] Login form!

    yes Im doing the thig that you say about and old password, but with the user id is a id on the table or what do you mean by user id. cause inmy table i have define id, username and password. the (id is autoincrementing) everytime a new user can be add, by the way how can I add and delete the users?

    this is the code i have so far... there are part from many other codes that i put together but cant get it to work.

    along i sen you my app so you can se what im trying to do wit it.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width