Dim dear As OleDbDataReader = Comm.ExecuteReader()为什么在VB.NET下 可以用的 在
为什么在VB.NET下 可以用的 在asp.net下怎么就不能用了呢
Private Sub ImageButton10_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton10.Click
Dim bo As Boolean
bo = False
Dim adminsql As String
adminsql = "select name from user where name='" & TextBox1.Text.Trim & "' and passwd ='" & TextBox2.Text.Trim & "'"
Dim Comm As New OleDbCommand(adminsql, myconn)
Dim dear As OleDbDataReader = Comm.ExecuteReader()
While (dear.Read())
'bo = True
'dengji = dear.Item(7)
'name = dear.Item(1)
'End While
If (bo) Then
Label2.Text = name + " 已登陆"
Else
Response.Redirect("注册.aspx")
End If
dear.Close()
End Sub