Imports System.Data
Imports System.Data.SqlClient

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Using conVerbindung As New SqlConnection(My.Settings.strNWConnection)
            Dim dtOrders As New DataTable

            Dim cmdOrders As SqlCommand = New SqlCommand
            With cmdOrders
                .CommandText = "SELECT * FROM orders"
                .Connection = conVerbindung
            End With

            Dim daOrders As New SqlDataAdapter
            With daOrders
                .SelectCommand = cmdOrders
            End With

            daOrders.Fill(dtOrders)

            DataGridView1.DataSource = dtOrders



        End Using
    End Sub
End Class
