Hi ,
iam using asp.net2.0 with c# with backend sql server 2000.
in my database some user dosent have password (null)
and some user having password .when iam checking the user it is giving message invalid user or password.
can you correct my querry which helps me
|
zhong chenPosted Jun 22, 2010, 11:37 PM
Marimuthu ArigovindasamyPosted Jun 22, 2010, 3:29 AM
Please check your username, password and server details in connectionstring.
and also, there is a syntax error in the query.
SqlCommand cmd = new SqlCommand("select * from Usersprogrammer where UserName='" + txtusername.Text + "' Or Password='"+txtpassword.Text+"'", con);