Microsoft KB Archive/165410

= PRB: Private DataSession Loses ASCENDING | DESCENDING Order =

Article ID: 165410

Article Last Modified on 5/12/2003

-

APPLIES TO


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

-



This article was previously published under Q165410



SYMPTOMS
When opening the same tables in two separate private data sessions with the same index tag in both, the setting of ASCENDING or DESCENDING is not scoped to the data session. If in one data session you open a table and set the order to ascending and then start another data session and open the table and set the order to descending, the descending order is also applied to the first data session. This is an issue only when both forms are running in the same session of Visual FoxPro or a Visual FoxPro Runtime.



RESOLUTION
In the Activate Event of the form, issue the SET ORDER TO command. For example: SET ORDER TO ASCENDING



STATUS
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
 Create a new form. Add the Customer table, located in the Visual FoxPro\Samples\Data directory, to the DataEnvironment. Drag the table from the DataEnvironment to the form to create a grid. Set the DataSession Property of the form to 2-Private Data Session.  In the Init of the form add the following lines of code: SET ORDER TO Cust_id ASCENDING GO TOP  Set the Caption property of the form to ASD.</li> Save the Form as ASD .</li>  Modify the form and change the Init code to the following: SET ORDER TO Cust_id DESCENDING GO TOP </li> Change the Caption property to DSD.</li> Save the form as DSD .</li> Run the DSD form and then run the ASD form.</li> Click back on the DSD form and notice the order changes to ASCENDING.</li></ol>

Keywords: kbprb KB165410

-

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

© Microsoft Corporation. All rights reserved.