dbPath

dbPath(): String;

The dbPath method of the Application class returns the database path. The database path value corresponds to the database path that must be included in the program target (that is, the command line) when running the application. For details, see "Jade Configurations", in Chapter 1 of the Installation and Configuration Guide.

If your application requires an absolute path, ensure that you specify an absolute path in the path parameter of the program shortcut that starts the node.

You may require the database path when opening external files or when opening a common File Open dialog, as shown in the following example.

vars
    fopen : CMDFileOpen;
    name  : String;
begin
    create fopen;
    fopen.initDir := app.dbPath;         // set the initial directory
    if fopen.open = 0 then               // not canceled and no error
        name := fopen.fileTitle;         // use the returned value
    endif;
epilog
    delete fopen;                        // tidy
end;