' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Data.SqlClient
Imports System.Configuration

Namespace E
    Public Class Program
        Public Shared Sub Main(args As String())
            Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("ExpressTest").ConnectionString)
            con.Open()
            Dim cmd As New SqlCommand("SELECT * FROM T1", con)
            Dim rdr As SqlDataReader = cmd.ExecuteReader()
            While rdr.Read()
                Console.WriteLine(rdr(0) & " " & rdr(1))
            End While
            rdr.Close()
            con.Close()
        End Sub
    End Class
End Namespace
