The dbinfo( function gets information about a database: what forms it contains, what fields, what flash art pictures, etc.
This function has two parameters:
option – controls what kind of information this function will retrieve.
database – is the name of the database you want to get information about. This must be a database that is currently open. If you want to get information about the current database you can use the info(“databasename”) function or simply use empty text ("").
The dbinfo( function gets information about a database: what forms it contains, what fields, what flash art pictures, etc. This function returns a text array, number or binary data, depending on the option selected.
The “all” option returns a dictionary containing all of the items below (except for items that return binary data, like fieldtypes). You can also get this dictionary by omitting the option parameter, like this:
If you omit both parameters the function will return the dictionary for the current database.
Of course to display the returned dictionary you would need to use the dumpdictionary( function.
The “angleunits” option returns the name of the current angle units setting for the specified database, either radians or degrees. (You can change this setting with the setdatabaseoptions statement.
The “crosstabs” option produces a text array (with carriage return separators) containing a list of the crosstabs in the database.
The “databytes” option returns the number of bytes used by the data in this database.
The “datasheetleftedge”, “datasheettopedge”, “datasheetrightedge” and “datasheetbottomedge” options return the dimensions of the data sheet window (whether it is currently open or not). The “datasheetrectangle” function returns a rectangle with all four coordinates in binary form.
The “datasheetoptions” option returns the data sheet window options, for example notoolbar if the toolbar is disabled.
The “fieldcount” option returns the number of fields in this database.
The “fieldnumber” option returns the number of the currently active field in this database (starting from 1). If the database has more than one window open, this function will return the active field in the window that was most recently in front.
The “fields” option produces a text array (with carriage return separators) containing a list of the fields in the database. (If a field name contains carriage returns, they are converted to spaces before being placed into the array.) There are also several variations that return only a subset of fields – “visiblefields”, “hiddenfields”, “textfields” (which also includes choice fields), “integerfields”, “floatfields”, “numericfields” (returns both integer and float fields), “datefields”, “binaryfields” and “nonbinaryfields”.
The “fieldtypes” option returns a binary array with one byte per field. Each byte indicates the type of the corresponding field:
0 ☞ text 4 ☞ date 5 ☞ floating point number 6 ☞ integer 11 ☞ binary
The “filevariables” option produces a text array (with carriage return separators) containing a list of the fileglobal variables associated with the database.
The “flash art” option produces a text array (with carriage return separators) containing a list of the flash art in the database’s Flash Art gallery. Since Panorama X doesn’t support the Flash Art gallery feature, this will always return empty text.
The “folder” option returns the folder path to the database (the location of the database file on the disk, see Files and Folders.).
The “forms” option produces a text array (with carriage return separators) containing a list of the forms in the database.
The “library” option returns true if this database is a library, false for regular databases.
The “lockmessage” option returns information about the last attempt made to lock a record. This can be used with the lockcurrentrecord( function to find out the reason why a record could not be locked.
The “maxsummarylevel” option returns the level of the highest summary level in the database, a number from 0 to 7. If there are no summary records, the result will be zero.
The “permanent” option produces a text array (with carriage return separators) containing a list of the permanent variables associated with this database. However, the permanent variables will not be listed if the database is in user or custom mode (the database must be in author mode).
The “procedures” option produces a text array (with carriage return separators) containing a list of the procedures in the database.
The “records” option returns an integer value – the total number of records in the database.
The “selected” option returns an integer value – the number of currently selected records in the database.
The “summarylevels” option produces a two dimensional text array with detailed information about the summary records in the database Each line contains information about a summary level (the first line is for data records, the second for first level summaries, etc.). Each line contains three values separated by tabs. The first value is the name of the field that corresponds to this summary level, if any (in other words, the field that this level was groupbed by). The second value is the overall number of records at this summary level, and the third value is the number of visible records at this summary level.
The “savedwindows” option produces a list of windows that were open the last time the database was saved. Form windows are prefixed by
FORM:, procedure windows are prefixed by
The “lasttimewindowinfront” option returns a superdate value (combined date and time) that indicates the last time the data sheet in this database was the active window.
The following options apply to shared and web published databases.
The “shared” option returns true if the database is currently shared, or false if it is not.
The “host” option returns the name of the server this database is hosted on.
The “connected” option returns true if the database is currently connected to the server, or false if it is not (for example if it is a single user database, or if it is shared but Panorama failed to make a connection to the server when it opened).
The “connecterror” option normally returns empty text (
""). However, if there was an error in attampting to connect this database to the server, this option will return the error message.
The “serverdatabasename” option returns the name of this database on the server, which may be different than the name on the local client.
The “serverdatabaseid” option returns a unique identifier for this database on the server. This value will change each time a new sharing generation is uploaded to the server.
The “serverdatabaseidhistory” option returns the history of all the generations of this database on the server. The format of the text returned by this option is undocumented.
The “autounlock” option returns true if this database is configured to automatically unlock the current record after a specified delay (see the next option). If automatic unlocking is disabled, this option returns false.
The “autounlockduration” option returns how much inactivity is allowed (in seconds) before changes in the current record are sent to the server and the record is unlocked. This value has no effect if the previous option is false.
The “webpublish” option returns true if web publishing is enabled for this database.
The “webstartopen” option returns true if the server automatically opens this database when the server launches.
The “webautoopen” option returns true if the server automatically opens this database on the server each time it is accessed by a web browser.
The “webautoclose” option returns true if the server automatically closes this database on the server after each time it is accessed by a web browser.
The “webautosave” option returns true if the server automatically saves changes to this database after each time it is accessed by a web browser.
|10.2||Updated||Added the new lockmessage option, and over a dozen new client/server options.|
|10.0||Updated||Carried over from Panorama 6.0, but with numerous new options.|