BUG: BROWSE with Child Relationship Gives Incorrect Info

Last reviewed: June 27, 1995
Article ID: Q117409
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6
  • Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c

SYMPTOMS

If two sets of one-to-many relationships are set up and two Browse windows are created using fields from both the parent and the child databases, the second Browse window will show the first parent database as having no children even if children do exist.

To illustrate this situation, issue the following commands:

   SET DEFAULT TO <FoxPro_directory>\TUTORIAL

   USE customer IN 1
   USE invoices IN 2
   SET ORDER TO TAG cno OF invoices.cdx IN invoices
   SET RELATION TO cno INTO invoices ADDITIVE
   SET SKIP TO invoices

   USE offices IN 3
   SELECT 3
   USE salesman IN 4
   SET ORDER TO TAG ono OF salesman.cdx IN salesman
   SET RELATION TO ono INTO salesman ADDITIVE
   SET SKIP TO salesman

   SELECT 1
   DEFINE WINDOW custinv FROM 1,1 TO 20,10
   BROWSE WINDOW custinv FIELDS customer.cno, invoices.cno NOWAIT SAVE

   SELECT 3
   DEFINE WINDOW offsale FROM 1,15 TO 20,25
   BROWSE WINDOW offsale FIELDS offices.ono, salesman.ono NOWAIT SAVE

The last Browse window shows OFFICES.ONO with no SALESMAN.ONO fields. This is incorrect, since there are multiple SALESMAN records with a "1" in the ONO field. If you scroll the window, the child records will appear. If you click outside the Browse window and then click the Browse window again, the child records will disappear. However, the child records will appear and remain visible if some other record, such as OFFICES.ONO 2, is selected in the Browse window.

CAUSE

The record pointer for SALESMAN.ONO is at the end of the file (EOF). Once another record is selected in the Browse window, the record pointer for SALESMAN is moved off from the end of the file and the Browse window functions as expected.

RESOLUTION

To avoid this problem, include the following KEYBOARD command at the end of this program:

   KEYBOARD "{PGDN}"

This command repositions the record pointer for the parent database, OFFICES, and the child database, SALESMAN.

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.


Additional reference words: FoxMac FoxWin 2.50 2.50a 2.50b 2.50c 2.60
buglist2.50
buglist2.50a buglist2.50b buglist2.50c buglist2.60
KBCategory: kbprg kbdisplay kbbuglist
KBSubcategory: FxprgBrowse


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.