Microsoft KB Archive/72771

{| = Q+E Err Msg: Incompatible Datatypes in Expression =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q72771 Summary : When using the dBASE driver in Q+E for Microsoft Excel version 3.0, you will receive the error message &quot;Incompatible Datatypes in Expression&quot; when attempting to create an index on multiple fields that are not of the same defined type.

MORE INFORMATION
When creating an index with multiple fields, the fields must be of the same defined type, or must be converted into a compatible type using a supported dBASE function. This is identical to the way dBASE creates index files.

Steps to Reproduce Problem

 * 1) Activate Q+E.
 * 2) From the File menu, choose Define.
 * 3) Choose dBaseFile as the source and EMP.DBF from the File List. EMP.DBF is an example file that is automatically installed into the QE subdirectory of the directory where you installed Excel.
 * 4) Choose OK.
 * 5) Select the HIRE_DATE and the LAST_NAME fields from the Define window.
 * 6) From the File menu, choose Define Index.
 * 7) Type TEST.NDX as the filename. HIRE_DATE + LAST_NAME will be listed in the Expression Box.
 * 8) Choose OK.

The error message &quot;Incompatible Datatypes in Expression&quot; will appear. To properly create the index, edit the Expression Box and use the dBASE function DTOS around the HIRE_DATE field.

For example, the following will convert the DATE field into a character string and the index will be created:

DTOS(HIRE_DATE)+LAST_NAME Numeric and logical fields should also be converted when being used with character fields. Reference(s)

&quot;Q+E for Microsoft Excel's User's Guide.&quot; Version 3.0, pages 120-121, 131-132.

&quot;dBASE III Plus,&quot; Douglas Hergert, page 215.
 * }