By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

login

P: n/a
im writing an application that requires a user to login with username and
password and the system would check it again the access database. i'm also
using oledb connection to connect to the database and i'm not getting any
rows back where i do a select statement to check the username and password.

"select * from user where username = '" & txtusername.text & "' and password
= '" & txtpassword.text & "'"

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Herb,

To make sure your connection is working, can you read other tables?

Regards,

--
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
PS: Can I suggest you also take a look at articles on sql injection attacks?
The code you are writing is very likely to suffer from these.

"herb" <he**@discussions.microsoft.com> wrote in message
news:68**********************************@microsof t.com...
im writing an application that requires a user to login with username and
password and the system would check it again the access database. i'm also using oledb connection to connect to the database and i'm not getting any
rows back where i do a select statement to check the username and password.
"select * from user where username = '" & txtusername.text & "' and password = '" & txtpassword.text & "'"

Nov 21 '05 #2

P: n/a
Hi,

First off you should encrypt a password before you save it. Second
the reason you are not returning any rows is that either the password or
username is wrong.

http://msdn.microsoft.com/msdnmag/is...a/default.aspx

Ken
----------------------
"herb" <he**@discussions.microsoft.com> wrote in message
news:68**********************************@microsof t.com...
im writing an application that requires a user to login with username and
password and the system would check it again the access database. i'm also
using oledb connection to connect to the database and i'm not getting any
rows back where i do a select statement to check the username and password.

"select * from user where username = '" & txtusername.text & "' and password
= '" & txtpassword.text & "'"
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.