DB Object
- Last UpdatedMar 24, 2023
- 1 minute read
Members
|
Name |
Type |
Purpose |
|---|---|---|
|
Name |
STRING |
The name of the database, up to 32 characters. |
|
Description |
STRING |
The database description, up to 120 characters. |
|
Access |
STRING |
Access type ('UPDATE', 'MULTIWRITE', 'CONTROLLED'). |
|
Claim |
STRING |
Claim mode for multi-write databases ('EXPLICIT', 'IMPLICIT'). |
|
File |
STRING |
Database filename, up to 17 characters. |
|
Foreign |
STRING |
FOREIGN or LOCAL. |
|
Number |
STRING |
Database number. |
|
Team |
TEAM |
Owning Team. |
|
Type |
STRING |
Database type, for example, 'DESI'. |
|
Refno |
STRING |
String containing Database reference number. |
|
Primary |
STRING |
Identifies whether a database is Primary or Secondary at the current location in a Global Project. |
Methods
|
Name |
Result |
Purpose |
|---|---|---|
|
MDBList() |
ARRAY |
Lists MDBs which contain this DB. |
|
Size() |
REAL |
File size in pages. |
|
Sessions() |
ARRAY OF DBSESS |
All sessions of the current database. |
|
Lastsession() |
DBSESS |
Last session information for database. |
|
DB(DBREF) |
DB |
Returns a DB object, given a DBREF. |
|
DB(STRING) |
DB |
Returns a DB object, given a name or reference number. |
These methods may be used in the following ways (in all cases '!!CE' is assumed to be a DB DATABASE element and '!!CE.Name' is a STRING object containing the element’s name).
Examples:
|
!D = OBJECT DB(!!CE) |
|
|
!D = OBJECT DB(!!CE.Name) |
|
|
!D = !!CE.DB() |
|
|
!D = !!CE.Name.DB() |
These methods should assist performance improvements to appware by making it easier to get from Database element to Object.
Command
|
!ARRAY = DBS |
$ Returns an array of the DBs in the current Project. |