Private Sub search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles search.Click Dim sqlcon As New SqlConnection("server=.;database=login;uid=sa;pwd=sa") Dim i As Integer sqlcon.Open()
Dim sqlcom As New SqlCommand("select * from telselect where name=" & txtname.Text, sqlcon)
这里有什么问题啊 高手帮我看看啊
Dim reader As SqlDataReader reader = sqlcom.ExecuteReader() Response.Write("<table border=0 width=400>") Do While reader.Read Response.Write("<tr>") For i = 0 To reader.FieldCount - 1 Response.Write("<td>" & reader.GetValue(i) & "</td>") Next Response.Write("</tr>")
Loop Response.Write("</table>") reader.Close() sqlcon.Close()
End Sub