PRB: "Data Type Mismatch" with Linked Tables in Query (147880)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
This article was previously published under Q147880 SYMPTOMS
One of the most common causes of the "Operator/Operand type mismatch" error
when running a query is that the joining fields between the tables are of
different data types. The field from each table that joins the tables for
the query must have identical data types. The exception is when one field
is numeric and the other is character. FoxPro will attempt to make the
character field numeric by using the VAL() function. Of course this is only
useful if the character field holds numbers only. If there are any other
types of characters in the field that FoxPro uses the VAL() function on,
the query result will contain no records.
CAUSE
The joining fields in the two tables are not of the same data type.
STATUS
This behavior is by design. Choosing the correct data type when joining
tables for a query is a necessity if the correct information is to be
retrieved.
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | KB147880 |
---|
|