Public Sub ReadMyData(ByVal myConnString As String)
Dim zohoConnection As New ZohoConnection(myConnString)
Dim zohoCommand As ZohoCommand = zohoConnection.CreateCommand()
zohoCommand.CommandText = "SELECT AccountID, \"Account Name\", Phone FROM Accounts"
zohoConnection.Open()
Dim zohoReader As ZohoDataReader = zohoCommand.ExecuteReader()
Try
' Always call Read before accessing data.
While zohoReader.Read()
Console.WriteLine(String.Concat(zohoReader.GetString(0), " ", _
zohoReader.GetString(1), " ", zohoReader.GetString(2)))
End While
Finally
' always call Close when done reading.
zohoReader.Close()
' Close the connection when done with it.
zohoConnection.Close()
End Try
End Sub