FIX: DBF() & RECCOUNT() Return Wrong Info About SQL CursorLast reviewed: October 20, 1997Article ID: Q117265 |
2.5x 2.6x | 2.5x 2.6x
WINDOWS | MS-DOSkbprg kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSUsing the RECCOUNT() or DBF() functions against a cursor returns information pertinent to the source data file instead of the currently selected cursor.
CAUSEIf a WHERE clause is used that references a field that is used as a key field in a .CDX index tag, the DBF() and RECCOUNT() functions will return data about the source data file instead of the cursor. This is because, in this case, the SQL-SELECT performs a SET FILTER on the current table, and returns the filtered information. Use the _TALLY variable to return the number of records processed by the SQL-SELECT command.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0 for Windows.
MORE INFORMATIONThis behavior will occur regardless of the status of the SET ORDER command. However, this behavior does NOT occur under Microsoft Windows NT.
Steps to Reproduce ProblemIn the steps below, you will be using the CUSTOMER database (which contains 500 records) in the TUTORIAL subdirectory. Make certain that the .CDX file is active, and that it includes a tag built on CNO.
For comparison, do the following:
|
Additional reference words: VFoxWin fixlist3.00 FoxDos FoxWin 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |