Problem: 
You may run a query on the Dentrix G5 + database via your DDP software and encounter an error that returns ctree ODBC error which includes the following key code:" -21025 CTDB - Internal error" e.g. the full error may be the following which includes the key code:

DBInit has failed: [FairCom][ODBC FairCom Driver 9.5.65535.6186(Build-120902_130902)][ctreeSQL] -21025 CTDB - Internal error



Solution:

This is a database related issue in that the odbc driver has encountered a record in the database query with some  "invalid data" fields in this client's database that the odbc driver has reached.  


Please ensure the following are recommended to the customer for the short and long term to resolve the issue:

1. Have the customer contact Dentrix support to have the data cleaned by our data cleanup technicians.  The process will take about 30-60 minutes and the customer will need to be out of dentrix while these utilities are ran. 


2. Recommend the office upgrade to the latest version of Dentrix to at least the G5.2+ versions ASAP or move that directly to bring down the probability of the issue occurring in the future.  The Dentrix  G5.2+ versions are able to handle some but not all cases of invalid data and "pass through" records with invalid data even though invalid data is reached.    In some cases however the program cannot handle some invalid data fields for which the error will appear and data may need to searched and cleaned by a DDP support technician.


3. Finally, if none of the above steps have resolved the issue, then please contact DDP support with the above information and your results so we could assist further.


Notes: 
In some cases the larger number of queries being run on the database may increase the possibility of reaching a record with invalid data, which may account for the number of larger occurrences for DDP clients with more clients with the issue if more intensified queries are being run.  Nonetheless the above solutions will still resolve the issue.


Keywords:

Unable to run query, database error odbc ctree sql errors