ник: Едрёныч
и вот что в итоге получилось, рабочий пример:
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient
Public Class форма1
Private Sub форма1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strConn, strSQL1 As String
strConn = "Data Source=.\SQLExpress;Initial Catalog=Northwind;Integrated Security=True;" 'Asynchronous Processing=True;"
Using cn As New SqlConnection(strConn) 'Строка подключения
cn.Open()
strSQL1 = "Select OrderID, CustomerID, OrderDate, ShippedDate, ShipCity" & _
" From Orders Where ShipCountry='Canada'"
Dim cmd1 As SqlCommand
cmd1 = New SqlCommand(strSQL1, cn)
Dim da1 As New SqlDataAdapter(cmd1)
Dim ds1 As New DataSet()
da1.Fill(ds1, "Orders")
DataGridView1.DataBindings.Add("", (ds1), "Orders")
DataGridView1.DataMember = "Orders"
Me.DataGridView1.DataSource = ds1
cmd1.Connection.Close()
cmd1.Connection.Dispose()
End Using
End Sub
End Class