SET DATASESSION Command

See Also

Activates the specified form's data session.

Syntax

SET DATASESSION TO [nDataSessionNumber]

Arguments

nDataSessionNumber

Specifies a form's data session to activate. If you omit nDataSessionNumber, data session 1 (the Global data session) is activated.

Remarks

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 true (.T.), 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 is typically used to debug forms, and should not be issued when a form is active.

The following SET commands scope to the current data session:

SET Commands
SET ANSI SET AUTOSAVE
SET BLOCKSIZE SET CARRY
SET CENTURY SET COLLATE
SET CONFIRM SET CURRENCY
SET DATABASE SET DATE
SET DECIMALS SET DELETED
SET DELIMITERS SET EXACT
SET EXCLUSIVE SET FIELDS
SET FIXED SET HOURS
SET LOCK SET MARK TO
SET MEMOWIDTH SET MULTILOCKS
SET NEAR SET NULL
SET POINT SET REPROCESS
SET SAFETY SET SECONDS
SET SEPARATOR SET SYSFORMATS
SET TALK SET UNIQUE