Microsoft KB Archive/132695

= PRB: Private Data Session Causes Blank Grid to Appear =

Article ID: 132695

Article Last Modified on 11/17/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q132695



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.



Steps to Reproduce Behavior
  Open a table in the current work area:      Versions 3.0 or 5.0 USE c:\vfp\samples\mainsamp\data\customer Version 6.0 USE C:\\Program Files\Microsoft Visual Studio \Common\Samples\Data\customer  Create a new form, and drag a grid control from the Forms Control toolbar onto the form. Set the Form.DataSession property to 2 - Private Data Session. Save and run the form. A blank grid object appears. Close the form. 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.</li></ol>

Additional query words: VFoxWin

Keywords: KB132695

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.