Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim aa As DataTable
Dim sqlConnection1 As SqlClient.SqlConnection
Dim strConnect As String = "Data source=localhost;Initial Catalog=111;"
sqlConnection1 = New System.Data.SqlClient.SqlConnection(strConnect)
sqlConnection1.Open()
Dim mycomand As New SqlCommand
mycomand = New SqlClient.SqlCommand("select tx from 222", sqlConnection1)
Dim sqlda As SqlDataAdapter
sqlda.Fill(aa)
这是我连接数据库的部分,不过运行时,总是提示系统错误,大家能不能帮我修改一下
VB.NET连接sql数据库