SET DATASESSION Command
Activates the specified form's data session.
Specifies a form's data session to activate. If you omit nDataSessionNumber, data session 1 (the Global data session) is activated.
By default, data session 1, the Global data session, is active when you start Visual FoxPro.
A form's DataSession property determines whether the form has its own unique data session when the form is created. If a form's DataSession property is set to 2, the form has its own data session; otherwise, a data session is not created for the form. You can use the form's read-only DataSessionId property to determine the form's data session number.
A data session is closed when the form that created the data session is released.
SET DATASESSION typically is used to debug forms. Care should be taken when issuing this command when a form is active, because tables in non-current datasessions are not accessible.
The following SET commands scope to the current data session: