class Session
Topic group Related topics Example
An object that manages simultaneous database access.
Syntax
[<oRef> =] new Session( )
<oRef>
A variable or property—typically of a Form or Report object—in which to store a reference to the newly created Session object.
Properties
The following tables list the properties, events, and methods of the Session class. For details on each property, click on the property below.
Property |
Default |
Description |
SESSION |
Identifies the object as an instance of the Session class | |
(SESSION) |
Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName | |
|
BDE session handle | |
0 |
Number of times to retry a failed lock attempt | |
0 |
Number of seconds to wait between each lock attempt | |
Empty string |
The name of custom object. Read-only. | |
null |
Container form or report
| |
Event |
Parameters |
Description |
|
Before the object is released | |
<percent expN>,
|
Periodically during data processing operations | |
Method |
Parameters |
Description |
|
Returns the user’s access level for the session | |
<cAlias>, <cDriver>, <cOptions> |
adds a User BDE Alias to the current BDE session | |
<password expC> |
Adds a password to the password table for access to encrypted DB (Paradox) tables | |
<cAlias> |
Deletes a User BDE Alias from the current BDE session | |
<group expC>, |
Logs the specified user into the session to access encrypted DBF (dBASE) tables | |
|
Returns the user’s login name for the session |
Description
A session represents a separate user task, and is required primarily for DBF and DB table security. dBASE Plus supports up to 2048 simultaneous sessions. When dBASE Plus first starts, it already has a default session.
DBF and DB table security is session-based. (SQL-table security is database-based.) To enable the Session object's security features, the database it is assigned to must be active. When you create a new Session object, it copies the security settings of the default session. Therefore, if you have a user log in when dBASE Plus starts, all the new sessions you create to handle multiple tasks will have the access level.
Unlike the Database and Query objects, a Session object does not have an active property. Sessions are always active. To close a session, you must destroy it by releasing all references to it.