If you don't want to actually do anything with the user record other than check it exists I wouldn't even use a recordset. Your adding unecessary weight to your application.
A typical command would be :
Execute this using a connection and a command to populate the parameters and get the return value and you'll have a more robust application.Code:SELECT Count(UserID) FROM tbl_Users WHERE UserName LIKE @UserName AND Password = @Password
You should always use parameterised SQL where ever possible.




Reply With Quote