不出结果
Dim conn As New Data.OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" + Server.MapPath("xitong.mdb"))
conn.Open()
Dim cmd3 As New Data.OleDb.OleDbCommand("select * from [score] where ID='" & Trim(Label2.Text) & "'and username='" & Trim(Label1.Text) & "' and score='尚未考试'", conn)
Dim rd3 As Data.OleDb.OleDbDataReader
rd3 = cmd3.ExecuteReader
If rd3.Read() Then
Response.Write("<script>alert('你还未考试了!');history.back();</script>")
Else
Dim cmd2 As New Data.OleDb.OleDbCommand("select score from [score] where ID='" & Trim(Label2.Text) & "'and username='" & Trim(Label1.Text) & "' and score<>'尚未考试'", conn)
Dim rd2 As Data.OleDb.OleDbDataReader
rd2 = cmd2.ExecuteReader
If rd2.Read() Then
Dim pass As String
pass = rd2("score").ToString()
Response.Write("<script>alert('你的成绩是:'" & pass & "'分');history.back();</script>")
End If
End If
怎么不查不出成绩?