The setdatabaseoptions statement modifies one or more properties of a database.


This statement has three parameters:

database – The database that contains the properties you want to modify, or "" for the current database.

option – The type of information you want to modify. See below for descriptions of each option. The option can be specified in either upper or lower case.

value – The new value for this option.


This statement modifies the properties associated with a database. The database must be open.

Note: You can specify multiple option/value pairs in a single setdatabaseoptions statement, like this:

setdatabaseoptions database,option1,value1,option2,value2,option3,value3


This option modifies changes the automatically generated number for the next record that will be added to the database. This allows you to generate numbers out of sequence, or to start the sequence at a specific value. This example sets the number to 1001.

setdatabaseoptions "","AutoNumber",1001

Note: You can find out the current autonumber value with the dbinfo( function. This example skips the next 50 numbers:

setdatabaseoptions "","Autonumber",dbinfo("autonumber","")+50


Panorama normally performs trigonometry calculations using radians, but you can override this on a database-by-database basis.

setdatabaseoptions "","AngleUnits","degrees"

Once set, any trig calculations performed while this database is active will be performed using the specified angular units (unless overridden with the Degree or Radian statements.


If set to true, this database will not be included in the File>Recent menu.

setdatabaseoptions "","ExcludeFromRecentMenu",true()

For example, you might want to do this for an auxilliary database that is secretly opened for lookups but not opened directly.

Data Sheet Dimentions

There are four options that allow you to specify the dimensions that will be used the next time the data sheet is opened. The dimensions are specified in points (72 points = 1 inch).

setdatabaseoptions "",

Note: If the data sheet is currently open, changing these values won’t have any effect, since Panorama will retain the values of the actual visible data sheet.

Data Sheet Toolbar

This option allows you to specify whether the tool bar will appear the next time the data sheet is opened. Use "notoolbar" or "nopalette" if you don’t want the toolbar to appear. If you do want it to appear, use "".

setdatabaseoptions "","DataSheetWindowOptions","notoolbar"

Note: If the data sheet is currently open, changing this option won’t have any effect, since Panorama will retain the toolbar status of the actual visible data sheet.

Security Settings

The setdatabaseoptions statement can enable and disable the same security settings available in the Database Options dialog – locking to an account, encryption, and authorized roles (in fact the Database Options dialog uses the setdatabaseoptions statement). Of course these options are only available if you are an authorized user, otherwise you’ll get an error. Be careful – if you are not logged on as an administrator it’s possible to get the database into a state that you are not authorized to get it out of!

To lock the database to the current account, use the "locktoaccount" option.

setdatabaseoptions "","locktoaccount",true()

Note: all of the options below require that the database be locked to the account.

To encrypt the database (AES–256 encryption), use the encrypt options:

setdatabaseoptions "","locktoaccount",true(),


There are four possible roles that a database user can have (see Managing Account Roles): Administrator, Developer, User and Anyone. Use the "OpenRole" option to specify which role is required to open the database:

setdatabaseoptions "","OpenRole","Administrator"

Again, be careful! If you are not logged on as administrator, the statement above will make the database innacessible to you!

To specify what role is required to change the design of the database, use the "DesignRole" option.

setdatabaseoptions "","DesignRole","Developer"

Once this is set, only developers and administrators will be able to change the design of this database, which includes adding or removing fields, editing procedures, or, in fact, running the setdatabaseoptions statement.

You can also use the "StandardUIRole" to specify what roles are allowed to use Panorama’s standard menus and tools.

setdatabaseoptions "","StandardUIRole","Developer"

With this setting, only Developers and Administrators will be able to use the tool palette and standard menus. Regular users will only be able to use pre-programmed procedures that have been set up by a developer or admin user.

See Also


10.0NewThis statement is new in this version.