db.open

Syntax db.open (f, readOnly)

Params f is a filespec or path string of a Frontier object database file.

readOnly is a boolean value indicating whether read-only or read-write access to the database is desired.

Action Opens the indicated database file and prepares it for subsequent access by other "db verbs". If readOnly is true, the file is opened read-only. Otherwise, it is opened with read-write permission.

Returns True.

Examples db.open ("System:Frontier:old.root", false)

   » true

db.open (Frontier.getFilePath (), false)

   » error: The file "Frontier.root" is already open with write permission.

Notes This verb must be called before any of the other external db verbs (all but db.get and db.set) may be used.

If the database is opened read-only, verbs that modify the database (db.setValue, db.newTable, db.delete, db.save) will fail. However multiple scripts, potentially on multiple machines, may access the same database simultaneously in read-only mode

You may open a database that is currently open in Frontier. In this case, changes are "live", updating open windows as you'd expect.

See Also db.getValue

db.setValue

db.close

file.open

fileMenu.open

Discuss