Dim conn As OleDbConnection
Dim user As String
Dim psw As String
Dim dr1 As OleDbDataReader
user = textbox1.Text
psw = textbox2.Text
conn = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("test.mdb"))
Dim check1 As String
check1 = "select count(*) from student where studentname='" + user + "'"
Dim cmd1 As New OleDbCommand(check1, conn)
Try
conn.Open()
dr1 = cmd1.ExecuteReader()
dr1.Read()
Dim count As String
count = cmd1.ExecuteScalar()
dr1.Close()
conn.Close()
If count <> 0 Then
Dim check2 As String
Dim dr2 As OleDbDataReader
check2 = "select *from student "
Dim cmd2 As New OleDbCommand(check2, conn)
Try
conn.Open()
dr2 = cmd2.ExecuteReader()
dr2.Read()
conn.Close()
If psw = dr2("studentpassword") Then
Response.Redirect("学生界面.aspx")
Else
Label3.Text = "登录密码错误"
End If
Catch ex As Exception
Response.Write(ex.Message)
End Try
Else
Label3.Text = "没有注册的用户"
End If
各位都帮我看一下吧,不知道这个错误提示是什么意思,怎么改?