I don't know about VB6 much more. but i think you should use stored procedure on you db and send parameters from your form to it.


SELECT TOP 1 UserName, Password FROM table_1
WHERE UserName=@UserName AND Password=@Password


like this. If TOP 1 is null you can respond that there is no such a username or such a user information.