| contents | queries | |
| configuration | templates | |
| expressions | sessions | |
| databases | data entry | |
| passwords | ||
| license | support |
User sessions are handled through a database on the server that tracks information for a user from one call to the next. This database is automatically created the first time you run the program (and can be recreated at any time simply by deleting the files and running the program). If no _sessionpath variable is provided, the session database will be written to the directory from which baserunner is executed, otherwise to the directory specified by _sessionpath. The directory that contains the session database must have write permission.
The session database will have the same base name as the executable (normally, baserun.dbf and either baserun.ftp or baserun.dbt). If you switch form the FoxPro version to the dBase version (or vice-versa), delete the session database, before funning the new version.
When the program is run, a session is created for the user. When a session is created, it is assigned a unique name. This name is passed to the program for all subsequent calls.
Session duration is set with the _minutes variable, or uses the default value of 10. This represents the number of minutes baserunner should maintain the session from the last call to the program. For instance, if the session duration is 15 minutes, the session will expire 15 minutes after the user's last call to the program.
Each time a new user session is started, all the records are checked against the current time. Sessions that have passed the session duration are marked deleted. If the database contains no expired sessions, a new session record is appended. If the database contains expired sessions, the new session overwrites the first expired session record. If all session records are expired, the session database is recreated, and the new session is appended as the first record. If an expired user session has not been overwritten by a new session, it may still be available.
The format of the session database is:
| Field | Type | Description |
|---|---|---|
| session | memo | Contains the users session ID. |
| cfg | memo | Contains the name of the configuration file passed to the program on start up. |
| curr_html | memo | Contains the name of the template file that is currently displayed. |
| curr_dbf | memo | Contains the name of the database currently in use. |
| sortorder | memo | Contains the expression used to sort the database. |
| filterset | memo | Contains the current query expression. |
| oldfilter | memo | Contains the last query expression. |
| list | memo | Contains the cached values of the lists currently in use. |
| total | memo | Contains the cached values of the current totals in use |
| unique | memo | Contains the cached values of the unique lists currently in use. |
| time | numeric | Contains the time this instance of the program was called (formatted as a long integer). |
| length | numeric | Contains the value of the _minutes variable from the configuration file. |
| currentpos | numeric | Contains the record number of the currently selected record. |
| display | numeric | Contains the current value of _display (the number of repeated records that are displayed). |
| rcount | numeric | Contains the number of records returned by the current query. |
| newfilter | logical | This field is set to true whenever a new filter is created. |
|