Public Sub ReadMyData(ByVal myConnString As String)
Dim adobe commerceConnection As New MagentoConnection(myConnString)
Dim adobe commerceCommand As MagentoCommand = adobe commerceConnection.CreateCommand()
adobe commerceCommand.CommandText = "SELECT customer_id, firstname, lastname FROM Customers"
adobe commerceConnection.Open()
Dim adobe commerceReader As MagentoDataReader = adobe commerceCommand.ExecuteReader()
Try
' Always call Read before accessing data.
While adobe commerceReader.Read()
Console.WriteLine(String.Concat(adobe commerceReader.GetInt32(0).ToString(), " ", _
adobe commerceReader.GetString(1), " ", adobe commerceReader.GetString(2)))
End While
Finally
' always call Close when done reading.
adobe commerceReader.Close()
' Close the connection when done with it.
adobe commerceConnection.Close()
End Try
End Sub