BUG: FIND Command is not Reliable

Last reviewed: June 27, 1995
Article ID: Q124880
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

The FIND command does not reliably locate numeric values when searching an indexed field for a value.

RESOLUTION

Use the SEEK command instead. FIND is included for backward compatibility, however it is preferable to use the SEEK command.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. 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

Run the following code to demonstrate this behavior. Note that the SEEK command reports finding the specified value, while the FOUND command does not.

   CLOSE DATABASES
   SELECT 1

   CREATE TABLE testtab (numfield N(10))
   USE
   USE testtab IN 1
   GO TOP

   FOR i = 1 TO 10
      APPEND BLANK
      REPLACE testtab.numfield WITH i
   ENDFOR

   INDEX ON numfield TAG numfield ADDITIVE
   USE
   USE testtab IN 1
   SET ORDER TO 1
   FIND(7)
   IF (FOUND())
      WAIT WINDOW "FIND found record with value of 7!"
   ENDIF

   GO TOP
   SEEK(7)
   IF (FOUND())
      WAIT WINDOW "SEEK found record with value of 7!"
   ENDIF


Additional reference words: FoxWin 2.60a buglist2.60a
KBCategory: kbprg kbbuglist
KBSubcategory: FxprgGeneral


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