' 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
Imports ByteFX.Data.MySqlClient

Class MainClass
    Public Shared Sub Main(ByVal args As String())
        Dim con As MySqlConnection = New MySqlConnection ("Database=Test;Data Source=localhost;User Id=;Password=")
        con.Open
        Dim sel As MySqlCommand = New MySqlCommand ("SELECT * FROM T1", con)
        Dim rdr As MySqlDataReader = sel.ExecuteReader
        While rdr.Read
            Dim f1 As Integer = rdr(0)
            Dim f2 As String = rdr(1)
            Console.WriteLine(f1 & " " & f2)
        End While
        rdr.Close
        con.Close
    End Sub
End Class 
