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
VB.NET |

Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 21, 2010, 11:29 PM EDT
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);
zhong chen8 reputationPosted Jun 22, 2010, 7:37 PM EDT