PRB: Private Data Session Causes Blank Grid to Appear

Last reviewed: October 18, 1996
Article ID: Q132695
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 5.0

SYMPTOMS

A blank grid object appears after you drag a grid control onto a form in the Form Designer, set the Form.DataSession property to 2 (Private Data Session), and run the form.

CAUSE

This is by design. It occurs if no tables have been added to the data environment of the form.

If no table is specified in the Grid.RecordSource property, the grid uses the open table in the current work area. If no tables were added to the data environment of the form, the private data session has no open tables, so the grid does not have any data to display.

RESOLUTION

Either use the default data session, or add one or more tables to the data environment of the form.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open a table in the current work area:

    USE c:\vfp\samples\mainsamp\data\customer

  2. Create a new form, and drag a grid control from the Forms Control toolbar onto the form.

  3. Set the Form.DataSession property to 2 - Private Data Session.

  4. Save and run the form. A blank grid object appears. Close the form.

  5. Modify the form in the Form Designer. Set the Form.DataSession property to 1 - Default Data Session. Save and run the form. The grid is populated with data from the Customer table.


Additional reference words: 5.00 3.00 VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxtoolFormdes


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