Results 1 to 4 of 4

Thread: Method for validating logins

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15

    Question

    I am developing a VB app that needs to connect to a MS SQL Server database using ADO.

    I have a form that accepts a username and password. These need to be a valid SQL username/password. What is the best method of validating the input to ensure the login is a user in the SQL db?

    Success is a journey, not a destination.

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    What else can validate the login better than the SQL Server itself?

    Try to use the same username and password to access the SQL Database. If the database is accessed, the username and password are correct.


    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15

    SQL Login validation

    Thanks!

    I had figured that much out! My question was poorly phrased. What I mean't to ask was how do you trap and handle the error(s) that come back from the SQL server.
    Success is a journey, not a destination.

  4. #4
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    honeybee

    If you are using ADO, I think you can let the default error message appear on the screen. If the connection to the database fails, you can check the ADODB errors collection for such errors.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

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