coward
Member
well after some playing I had my app going real good and all - but with a ty access database that I had as a test db.
I have got it going with my other db now tho that is real
now the problem is that my recordset has 2 fields
both appear empty.
code snippet:
so the initial command works fine if the record is returned with both username and password. if either field is empty i do a test for that and it throws its toys. BUT if one field is right and the other is wrong it causes an exception at "userName =" - of course because the recset is effectively empty, well the fields are - recset.fields.count returns 2 so there are the 2 fields in it.
any help ?
an alternate way would kick , but this seems to be the easiest, perhaps best way (most secure). so yeah ideas ?
I have got it going with my other db now tho that is real
now the problem is that my recordset has 2 fields
both appear empty.
code snippet:
Code:
command = "SELECT user_name,user_password FROM users WHERE user_name=" & txtUsername.Text & " AND user_password=PASSWORD(" & txtPassword.Text & ")"
recset = myconn.Execute(command)
MsgBox(recset.Fields.Count)
userName = recset.Fields.Item("user_name").Value
userPass = recset.Fields.Item("user_password").Value
so the initial command works fine if the record is returned with both username and password. if either field is empty i do a test for that and it throws its toys. BUT if one field is right and the other is wrong it causes an exception at "userName =" - of course because the recset is effectively empty, well the fields are - recset.fields.count returns 2 so there are the 2 fields in it.
any help ?
an alternate way would kick , but this seems to be the easiest, perhaps best way (most secure). so yeah ideas ?