// Create a command selecting all records from the Accounts table.
Devart.Data.ZohoDesk.ZohoDeskCommand command = new Devart.Data.ZohoDesk.ZohoDeskCommand("select * from Accounts");
try
{
// Execution of the command will fail as no connection is set to it.
command.GetRecordCount();
}
catch (QueryRecordCountException ex)
{
// Use the InnerException property to determine the actual error occurred.
Console.WriteLine("An error occurred while counting records in the result set: "
+ ex.InnerException.Message);
}