Sessions

<< Click to Display Table of Contents >>

Navigation:  Basic concepts > BDE Objects >

Sessions

Previous pageReturn to chapter overviewNext page

An application can maintain one or more sessions. Sessions provide the means to isolate a set of database access operations without the need to start another instance of the application. A default session is automatically created when each application initializes. The session object is a container for all other Borland Database Engine (BDE) runtime objects that can be created:

Databases

Cursors

Query statements

If you access an object created in another session, the current session will change to the session in which the object was created. The session is also the owner of all table and record locks acquired by all objects within the session. This means that a table or record lock acquired using one cursor in a session is owned by all cursors in the session that are opened on the same table. Any of the cursors on the same table can release such a lock. Additional sessions can be created to allow for different locking contexts.

Another property of the session is the private directory, where BDE places all temporary file-based tables created on behalf of the session. In addition, the session owns two properties specific to the Paradox driver: passwords (for gaining access to password protected tables) and the network control directory, where the PDOXUSRS.NET file is located.