Method DacSession():setDefault() Professional
Changes the default session of the current thread
:setDefault([lSet]) --> self
The method returns the object executing the method.
Since it is possible to establish connections to more than one server using multiple instances of the DacSession class, it is necessary to specify the default session object to be used by DbUseArea()/USE or DbCreate() operations for the current thread. This is accomplished by calling the method :setDefault(), which defines a DacSession object as the default session of the current thread.
All requests for database operations created by commands and functions such as USE or DbCreate() for example, are forwarded to the server by the default session object. A default session has thread-local scope in multi-threaded programs. This means that each thread can have its own default DacSession object.
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.