vb.net ConnectionString 属性尚未初始化
Dim conn As SqlConnectionDim da As SqlDataAdapter
Dim ds As DataSet
conn = New SqlConnection
da = New SqlDataAdapter()
ds = New DataSet
conn.ConnectionString = "Data Source=20101127-0930;Initial Catalog=数据库名;Integrated Security=True"
conn.Open()
da.SelectCommand = New SqlCommand
da.SelectCommand.Connection = New SqlConnection
da.Fill(ds, ds.DataSetName)
DataGridView1.DataSource = "数据表"
运行时显示 ConnectionString 属性尚未初始化