Good morning guys, I'm reviewing XSharp and I enjoy the evolution when I recognize that the equivalent of the FoxPro SET command has been incorporated, a useful debugging object to see the different "dbf aliases" open in different data sessions.
The question arises for me: what is the approach to managing different private DataSessions in XSharp that try to emulate VFP Data Sessions?
In other words, in FoxPro, forms (Class Form, etc.) have the DataSession property that determines the visibility of open aliases. Can XSHARP understand the concept of private data sessions linked to the life of a form or some equivalent mechanism?
Does anyone on the forum have some code examples to analyze and understand it?
thank you
Juan
privates DataSession
Re: privates DataSession
Hi, Juan
You'll notice ADO.NET if you think about data binding further.
A DataSet is very similar to a DataSession.
You'll notice ADO.NET if you think about data binding further.
A DataSet is very similar to a DataSession.
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
Re: privates DataSession
Juan,
We indeed support the concept of a DataSession. There is a DataSession class (see https://www.xsharp.eu/runtimehelp/html/ ... ession.htm)
It has the list of open workareas/cursors
A form can create a new datasession :
oDataSession := DataSession{"DatasessionName"}
This object will be automatically added to the list of open datasessions.
The Datasession object has a name and an ID. It also saves the thread in which it was created.
When the thread exits, then the session will be closed automatically (and the files will be closed to).
The RuntimeState has a method SetDataSession() that you can use to set the current active datasession.
Please note that for index expressions to be properly evaluated by the Macro compiler, you will have to make sure that the DataSession that the file is opened in is the current active Datasession in the runtime state
We are still working on automatically opening and restoring the datasession for a form.
Robert
We indeed support the concept of a DataSession. There is a DataSession class (see https://www.xsharp.eu/runtimehelp/html/ ... ession.htm)
It has the list of open workareas/cursors
A form can create a new datasession :
oDataSession := DataSession{"DatasessionName"}
This object will be automatically added to the list of open datasessions.
The Datasession object has a name and an ID. It also saves the thread in which it was created.
When the thread exits, then the session will be closed automatically (and the files will be closed to).
The RuntimeState has a method SetDataSession() that you can use to set the current active datasession.
Please note that for index expressions to be properly evaluated by the Macro compiler, you will have to make sure that the DataSession that the file is opened in is the current active Datasession in the runtime state
We are still working on automatically opening and restoring the datasession for a form.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu