public void ReadMyData(string myConnString)
{
string mySelectQuery = "SELECT AccountID, \"Account Name\" FROM Accounts";
ZohoConnection zohoConnection = new ZohoConnection(myConnString);
ZohoCommand zohoCommand = new ZohoCommand(mySelectQuery,zohoConnection);
zohoConnection.Open();
ZohoDataReader zohoReader = zohoCommand.ExecuteReader();
try
{
while (zohoReader.Read())
{
Console.WriteLine(zohoReader.GetString(0) + ", " + zohoReader.GetString(1));
}
}
finally
{
// always call Close when done reading.
zohoReader.Close();
// always call Close when done reading.
zohoConnection.Close();
}
}