con.Open() 问题
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim con As New SqlConnection("Server=localhost; Database=Northwind; Integrated Security=true") con.Open()
Dim cmd As New SqlCommand("select employeeid from employees where city='London'", con) Dim rs As SqlDataReader = cmd.ExecuteReader()
While rs.Read ComboBox1.Items.Add(rs(0)) End While
con.Close() con.Open() 问题出在这行 告诉我说:未处理的“System.Data.SqlClient.SqlException”类型的异常出现在 system.data.dll 中。
其他信息: 系统错误。