这段代码是用什么编译的?什么语言啊?
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.ClickDim str As String
Dim passstr As String
passstr = Trim(CStr(TextBox2.Text))
str = "'" & TextBox1.Text & "'"
Dim sql As String = "select * from adminlist where 帐号=" & Trim(str)
‘在数据库中搜索帐号为textbox1.text的数据’
Dim connstr As String = "server=localhost;uid=sa;pwd=;database=book"
Dim myconn As New SqlClient.SqlConnection(connstr)
Dim da As New SqlClient.SqlDataAdapter(sql, myconn)
Dim ds As New DataSet
da.Fill(ds, "adminlist")
Dim dacomm As SqlClient.SqlCommandBuilder = New SqlClient.SqlCommandBuilder(da)
If ds.Tables("adminlist").Rows.Count = 1 Then
’判断帐号密码是否和数据库匹配’
If passstr = Trim(ds.Tables("adminlist").Rows(0)("密码")) Then
Response.Redirect("book.aspx")
Else
Response.Write("密码错误!")
End If
Else
Response.Write("用户名不存在!")
End If
End Sub
End Class