Q+E Err Msg: Incompatible Datatypes in Expression

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 "Incompatible Datatypes in Expression" 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 "Incompatible Datatypes in Expression" 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)

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

"dBASE III Plus," Douglas Hergert, page 215.


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.