运算符丢失是怎么回事
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _"Data Source=C:\Inetpub\wwwroot\WebApplication1\data\db1.mdb")
cn.Open()
Dim sql As String
sql = "select UserName,PassWord,manage from denglu where UserName='" & TextBox1.Text & "' PassWord='" & TextBox2.Text & "'"
Dim cmd As New OleDbCommand(sql, cn)
Dim sdr As OleDbDataReader
sdr = cmd.ExecuteReader()
If (sdr.Read()) Then
Session("users") = Me.TextBox1.Text
Session("pass") = Me.TextBox2.Text
Session("Role") = sdr.GetInt32(2)
If Session("Role").ToString = "1" Then Response.Redirect("admin.aspx")
Else
Response.Redirect("main.aspx")
End If
Me.RegisterStartupScript("alert", "<script language='javascript'> alert('用户登陆失败,请重新输入!!')</script>")
sdr.Close()
cn.Close()
看着段代码有什么错误 谢谢