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