Click to See Complete Forum and Search --> : Method for validating logins
nickc
Nov 12th, 2000, 01:19 AM
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?
honeybee
Nov 12th, 2000, 10:12 AM
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.
nickc
Nov 12th, 2000, 02:04 PM
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.
honeybee
Nov 12th, 2000, 07:22 PM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.