Posted on: 4/23/2015 1:42:56 PM | Views : 635

I created login form. It works fine but password is always wrong.
Dim conn As New SqlConnection("Data Source=[server];Initial Catalog=;Persist Security Info=True;User ID=[userid];Password=[password]") conn.Open() Dim command As New SqlCommand("select password from users where name='" + txtlogin.Text + "'", conn) Dim dr As SqlDataReader dr = command.ExecuteReader If (dr.Read) Then If (dr(0).ToString = txtpass.Text) Then Response.Write("Logged in") Else Response.Write("Wrong password ") End If Else Response.Write("User doesn't exist") End If conn.Close()

Go to the complete details ...