Click or drag to resize

DataSession Class

X#
The DataSession class contains a list of workareas/cursors
Inheritance Hierarchy
Object
  Workareas
    DataSession

Namespace:  XSharp.RDD
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 CLASS DataSession INHERIT Workareas
Request Example View Source

The DataSession type exposes the following members.

Constructors
  NameDescription
Public methodDataSession(String)
Construct a new datasession
Public methodDataSession(Long, String)
Construct a new datasession
Top
Properties
  NameDescription
Public propertyCurrentWorkarea
Get Current Workarea Object
(Inherited from Workareas.)
Public propertyCurrentWorkareaNO
Get 1 based Current Workarea Number
(Inherited from Workareas.)
Public propertyId
The unique id for the datasession
Public propertyName
The name for the datasession.
Public propertyStatic memberSessions
List of all open DataSessions
Top
Methods
  NameDescription
Public methodStatic memberAdd
Add a DataSession to the list of open datasessions
Public methodStatic memberClose
Remove a DataSession from the list of open datasessions
Public methodCloseAll
Close All RDDs referenced by this Workarea list
(Inherited from Workareas.)
Public methodCloseArea(DWord)
Close area with 1 based Workarea number
(Inherited from Workareas.)
Public methodCloseArea(IRdd)
Close the area where this RDD object is used.
(Inherited from Workareas.)
Public methodCommitAll
Commit changes in all workares in this Workarea list
(Inherited from Workareas.)
Public methodFindAlias
Return 1 based Workarea Number for Alias or 0 when no found
(Inherited from Workareas.)
Public methodFindEmptyArea
Return 1 based empty Workarea
(Inherited from Workareas.)
Public methodGetAlias
Get Alias for 1 based Workarea Number
(Inherited from Workareas.)
Public methodGetCargo (Inherited from Workareas.)
Public methodGetRDD
Get RDD object for 1 based Workarea Number
(Inherited from Workareas.)
Public methodSetArea
Set RDD object and ALias for 1 based Workarea Number
(Inherited from Workareas.)
Public methodSetCargo (Inherited from Workareas.)
Public methodUnLockAll
Unlock All RDDs referenced by this Workarea list
(Inherited from Workareas.)
Top
Remarks
This class also manages the life time of all opened datasessions
When it detects that a datasession for a thread is no longer needed (because the thread has stopped) then it will close that datasession and all tables that are opened by it.
At application shutdown it will also close all opened datasessions including private datasessions that could be opened by forms or reports.
See Also