Application icon

Open Database

This function is used to open an album or track database if not already open.

The path may contain any of the escape sequences described in Escape Sequences. At runtime, the path to a database must be absolute (/) or relative to the home folder (~/) and must have a filename extension of .csv, .tsv or .tab.

The Update database values after opening option effectively causes an Update Database statement to be executed after the open.

The Readonly option will open the database as readonly. Note that when readonly, only manual editing of the database is disabled. The database can still be updated and changed via query database statements.

The Transient option is intended to be used when you create a database to be displayed to display transient information. ie. the actual files have no purpose once the database is displayed. When enabled, the database files will be deleted after opening the database. An attempt to save the file will result in a Save As. When opened, the database viewer's title bar icon will be a dim grey circle. No path will be displayed when right clicking on the title unless one is supplied in named variable Transient Database Path. The named variable must start with a / or it will be ignored.

Database viewers have a help button which displays help on the various functionality in the viewer. You can override this help by specifying a named variable which contains the help text. The text can include markup sequences and any of the escape sequences described in Escape Sequences.

This function is not valid when executing grouped.

If the file is not already open and it cannot be opened, the typical result is that an error message will be displayed and action processing will be terminated. You can change this behaviour by setting the Silent option. When the option is enabled, a failed open will result in the action test state being set to false. A successful open will set the action test state to true. When not batch processing if the path to the database is invalid an error will always be posted. Note that the silent setting is always treated as enabled when the statement is executed while batch processing.

When this statement is executed while batch processing, the opened database will only be accessible when the Action Pending window is displayed. Typically this is when the user is being prompted. Even when accessible, the database will have limited functionality. Typically open databases while batch processing should be employed as a means of user interaction. Note that when a database is opened in this manner, the loading of thumbnails will be halted unless the Action Pending window is displayed.