Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TADO query type mismatch

Status
Not open for further replies.

ChrisGSchultz

IS-IT--Management
Jul 8, 2001
82
US
I'm having a problem with an ADO query on a computer on our network (which has been rebuilt after a drive crash - Win98SE, Office 97 Pro, Novell, updated to MDAC 2.7 SP1, Jet 4.0 SP6). All other PCs running (4) this app are fine.

The application queries two Access databases and a DBF database using separate ADO connections (for each DB) and ADO queries (for each table) to find the last contact for a patient. Put in their name/birth year and it returns a list of matching names and for each, all contact dates in each database. In the process, it loads the Height & Weight into a DBgrid, and calculates the patients BodyMassIndex to determine the length of appointments, putting the result in the DBgrid.
The app uses ADO to avoid loading the BDE

However, on the rebuilt PC, the DBF file gives an error:
"ADOQuery_DBFpatient: Type mismatch for field 'height', expecting SmallInt actual: Float".
The Access tables give no problem at all.

The HEIGHT field is an integer - not a float. It looks like an MDAC problem, but I've tried everything to fix it. I've even tried creating a calc field in the query to create a new version of HEIGHT - to no avail.

BTW, I've tried using CompCheck (the MDAC component checker) to clean up the MDAC and load the latest version, but even that gives errors - got this from the Micro$oft's MDAC help web site.

Any suggestions, or do I get the IS department to load Office XP and hope that fixes it?

Chris ;-(
 
It sounds like the field definition was changed by the DBA during the rebuild.

I would create a small test app with just a dbgrid / datasource / connection and have Delphi generate the field definitions for you. Then see what is set up for height and adjust your app accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top