Public Sub PrintData(ByVal myConnection As SqlShimConnection)
Dim myCommand As SqlShimCommand = myConnection.CreateCommand()
myCommand.CommandText = "SELECT customer_id, firstname, lastname FROM Customers"
myConnection.Open()
Dim myReader As SqlShimDataReader = myCommand.ExecuteReader()
Try
While myReader.Read()
Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", _
myReader.GetString(1), " ", myReader.GetString(2)))
End While
Finally
myReader.Close()
myConnection.Close()
End Try
End Sub