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.
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 “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.
|10.0||Updated||Carried over from Panorama 6.0, but with numerous new options.|