Function DbSession() Foundation
Retrieves the DacSession object of the current work area.
DbSession([nWorkArea|cAlias]) --> oDacSession | NIL
The function returns the DacSession object managing the connection to the data source of the work area. If the table open in the work area is accessed without a DacSession object or if the work area is not used, the return value is NIL.
When an Xbase++ program accesses a database server, it must establish a connection to the server before tables of the database can be used. The connection is established by a DacSession object. Multiple servers can be accessed using multiple connections, so that multiple tables from different servers may be used in the application. If this is the case, the DbSession() function is helpful when the DacSession object maintaining the connection to the data source of the current work area must be retrieved.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.