BUG: LOOKUP() Function with SET RELATION Causes Crash

Last reviewed: April 18, 1995
Article ID: Q108635
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, 2.6

SYMPTOMS

In the Extended (32-bit) version of FoxPro for MS-DOS (FOXPROX.EXE), using the LOOKUP() function with a SET RELATION command may cause the system to terminate abnormally. In the Standard (16-bit) version of FoxPro for MS-DOS (FOXPRO.EXE), the above commands may cause an "Internal Consistency Error."

CAUSE

This problem arises while using LOOKUP() on a related table.

RESOLUTION

To work around this problem, do one of the following:

  • Use a SEEK routine to move the record pointer to the desired record, then retrieve the contents of a specified field in the record.

    -or-

  • Release the relation before using the LOOKUP() function with either SET RELATION OFF TO <table name> or SET RELATION TO.

STATUS

Microsoft has confirmed this to be a problem in FoxPro versions 2.5, 2.5a, 2.5b, and 2.6 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

WARNING: Close all files and save your data before completing the following procedure.

The following program will generate the error message:

   CREATE TABLE city (fc_number n(10), name c(10))
   INSERT INTO city VALUES(1,"Toledo")
   INDEX ON fc_number TAG fc_number

   SELECT 0
   CREATE TABLE person (pe_number n(10), fc_number n(10))
   INSERT INTO person VALUES (1,1)
   SET RELATION TO fc_number INTO city

   ? LOOKUP(city.name,1,person.pe_number)


Additional reference words: FoxDos 2.50 2.50a 2.50b buglist2.50
buglist2.50a
buglist2.50b exit quit fail 2.60 buglist2.60
KBCategory: kbprg kbbuglist
KBSubcategory:


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: April 18, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.