FIX: Records from another user session that violate the criteria for a parent table are displayed in the browse window for a child table in a Visual FoxPro 9.0 Service Pack 2 multiuser environment

Article translations Article translations
Article ID: 952548 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You have two browse windows that show a child table and its parent table in a Microsoft Visual FoxPro 9.0 Service Pack 2 multiuser environment. Other users add records to these tables. After these tables are updated, the records are displayed in the browse window for the child table in your Visual FoxPro instance. This occurs even though the records violate the criteria that are specified by the current values in the browse window for the parent table.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have Visual FoxPro 9.0 Service Pack 2 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Vfp9.exe9.0.0.66025,783,55203-Jun-200816:12
Vfp9r.dll9.0.0.66024,734,97603-Jun-200816:12
Vfp9runtime.msmNot Applicable4,586,49603-Jun-200816:13
Vfp9t.dll9.0.0.66023,907,58403-Jun-200816:12

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Steps to reproduce the problem

  1. Create a directory on your local disk.
  2. Start Visual FoxPro 9.0 SP2.
  3. Copy the following code into a new Visual FoxPro program file, and then save the file as Session1.prg to the directory that you created in step 1.
    _SCREEN.Caption = "SESSION 1"
    LOCAL liLoop AS INTEGER, cCodeNewRecord AS STRING
    cCodeNewRecord = "SES1"
    SET MULTILOCKS ON
    CURSORSETPROP("Buffering", 5,0)
    CD ( ADDBS(JUSTPATH(SYS(16))) )
    CLOSE DATA ALL
    ERASE KB952548_*.*
    
    CREATE DATABASE KB952548_DB
    CREATE TABLE  KB952548_DB_PARENT;
    	(h1 c(10) PRIMARY KEY)
    CREATE TABLE KB952548_DB_DETAIL;
    	(h1 c(10), ;
    	d1 c(30), ;
    	d2 c(30), ;
    	FOREIGN KEY h1 TAG TAGDETAIL REFERENCES KB952548_DB_PARENT )
    CLOSE DATABASES ALL
    
    OPEN DATABASE KB952548_DB SHARED
    USE KB952548_DB_PARENT SHARED IN 0
    USE KB952548_DB_DETAIL SHARED IN 0 ORDER TAGDETAIL
    SELECT KB952548_DB_PARENT
    SET RELATION TO h1 INTO KB952548_DB_DETAIL
    
    INSERT INTO KB952548_DB_PARENT (h1) VALUES (cCodeNewRecord)
    FOR liLoop = 1 TO 4
    	INSERT INTO KB952548_DB_DETAIL (h1, d1) ;
    	VALUES (cCodeNewRecord, "FIRSTSESSION " + TRANSFORM(liLoop))
    ENDFOR
    
    SELECT KB952548_DB_PARENT
    GO TOP
    DEFINE WINDOW PAR FROM 0,0 TO 10,30 FLOAT CLOSE GROW
    BROWSE LAST NOWAIT WINDOW PAR
    DEFINE WINDOW DETAIL FROM 15,15 TO 30,60 FLOAT CLOSE GROW
    SELECT KB952548_DB_DETAIL
    GO TOP
    BROWSE LAST NOWAIT WINDOW DETAIL
  4. Create another new Visual FoxPro program file by using the following code, and then save the file as Session2.prg to the directory that you created in step 1.
    _SCREEN.Caption = "SESSION 2"
    LOCAL cCodeNew AS STRING, liLoop AS INTEGER
    CD ( ADDBS(JUSTPATH(SYS(16))) )
    SET MULTILOCKS ON
    CURSORSETPROP("Buffering",5,0)
    CLOSE ALL
    CLOSE DATA ALL
    cCodeNew = "SES2"
    
    OPEN DATABASE KB952548_DB SHARED
    USE KB952548_DB_PARENT SHARED IN 0
    USE KB952548_DB_DETAIL SHARED IN 0 ORDER TAGDETAIL
    SELECT KB952548_DB_PARENT
    SET RELATION TO h1 INTO KB952548_DB_DETAIL
    
    INSERT INTO KB952548_DB_PARENT (h1) VALUES (cCodeNew)
    FOR liLoop = 1 TO 4
    	INSERT INTO KB952548_DB_DETAIL (h1, d1) ;
    		VALUES (cCodeNew, "SECONDSESSION " + TRANSFORM(liLoop))
    ENDFOR
    
    =TABLEUPDATE(.T.,.T.,'KB952548_DB_PARENT')
    =TABLEUPDATE(.T.,.T.,'KB952548_DB_DETAIL')
    CLOSE DATABASES ALL
    
  5. Run the Session1.prg program. When you do this, two browse windows open. The Kb952548_db_parent browse window displays the records of the parent table. The Kb952548_db_detail browse window displays the records of the child table.
  6. Start another instance of Visual FoxPro, and then run the Session2.prg program.
  7. Check the SESSION 1 window.
In the Kb952548_db_parent browse window, the current value of the H1 column is SES1. In this case, the Kb952548_db_detail browse window should display all the records in which the value of the H1 column is SES1. However, some records in which the value of the H1 column is SES2 are displayed unexpectedly in the Kb952548_db_detail browse window.

Properties

Article ID: 952548 - Last Review: October 8, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft Visual FoxPro 9.0 Professional Edition
Keywords: 
kbexpertiseadvanced kbqfe KB952548

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com