The RealBasic Database Admin Interface Reference
In addition to accessing database data, the RealBasic Module for OpenBase provides administration classes for creating and controlling OpenBase databases. This section provides an overview of the administrative classes.
Here is an instructional video & resources which will help you get started with the admin interface:

Download: OpenBase Connectivity Module
The OpenBaseInfoConnection Class
The Info Connection is used to query the server to find out what databases are running. It will also provide a variety of information about the remote host. Here is the overview of the class:
Methods | Parameters | Returns | Notes |
---|---|---|---|
Connect | host as a string | given a host address this will connect to that host | |
CheckStatesChanged | Boolean | this method queries the server to determine whether | |
there have been any changes in the status of server. | |||
It returns a boolean. True indicates that since the last | |||
query the state of one or more servers has changed. | |||
DatabaseStates | byref states() as string | this method fills two arrays, states and alerts with | |
byref alerts() as string | strings. There will be at most one entry per database | ||
States are formatted like | |||
<dbName>:<state>[%<progress>] | |||
valid states are | |||
• running | |||
• cleanup - percent will vary from 0.000 to 1.00 | |||
• stopping | |||
Alerts are formatted like | |||
<dbName>:<level>[%<progress>] | |||
valid levels are (this list is incomplete) | |||
•warning - percent will vary | |||
Disconnect | disconnects from the host | ||
FindPort | databaseName as string | String | Given a database and host address this call will tell |
hostAddress as string | you what port that database is listening on | ||
HostInfo | String | returns the host info | |
The info is formatted as (all one line) | |||
<OpenBase host name>|<server MAC address>| | |||
<server IP address>|<Server version>|<Server OS> |
This class is mainly used to get status information about the database.
The OpenBaseAdmin Class
The Admin Class allows you to perform a variety of functions on the remote server. For the Admin Class, either the read or host password will normally be required.
A read password allows you to read the attributes from the server. A host password allows you to modify a setting, create a database or perform some other administrative function that changes the server. It is important that you use this object to first check to make sure you have a valid password before using it with one of the functions.
Here is an overview of the class:
Methods | Parameters | Returns | Notes |
---|---|---|---|
Connect | whichhost as string | Boolean | given a host address this will connect to that host |
Connect | Boolean | connects to the host specified by the HOST propertyt | |
AutoStartDatabases | adminPassword as string | string() | this method returns an string array containing the names |
of all the databases set to start at boot. | |||
Requires the host READ password | |||
SetDatabaseAutoStart | databaseName as string | Boolean | will set the state of the autostart flag for this named database |
start as boolean | requires the HOST password | ||
adminPassword as string | returns TRUE if the call succeeds | ||
CheckHostPassword | hostPassword as string | Boolean | given a password this method verifies that it is the |
correct password | |||
Returns false given an incorrect one | |||
SetHostPassword | oldAdminPassword as string | Boolean | change the host password to the new one |
newAdminPassword as string | requires the old one | ||
returns trues if changed | |||
CheckReadPassword | readPassword as string | Boolean | given a password this method verifies that it is the |
correct password | |||
Returns false given an incorrect one | |||
SetReadPassword | oldAdminPassword as string | Boolean | changes the read password |
newAdminPassword as string | requires the old read password | ||
returns trues if changed | |||
CreateDatabase | databaseName as string | will create a new database with the given name. | |
adminPassword as string | requires a valid HOST password | ||
Returns false if the call did not succeed or the | |||
password was not valid | |||
DeleteDatabase | databaseName as string | will delete the named database given a valid password | |
adminPassword as string | requires the HOST password | ||
DuplicateDatabase | databaseName as string | will duplicate the named database given a valid password | |
adminPassword as string | requires the HOST password | ||
RenameDatabase | databaseName as string | Boolean | renames the database to the new name |
newDatabaseName as string | requires the HOST password | ||
adminPassword as string | returns true if succeeds | ||
MoveDatabase | sourceDatabaseName as string | Boolean | moves the source database to the destination |
sourceHostPassword as string | requires the source HOST password and destination | ||
destHost as string | host password | ||
destHostPassword as string | returns true if the move succeeds | ||
StartDatabase | databaseName as string | Boolean | starts the named database |
adminpassword as string | requires the HOST password | ||
returns true if the database starts | |||
StopDatabase | databaseName as string | Boolean | stops the named database |
adminpassword as string | requires the HOST password | ||
returns true if the database starts | |||
DatabaseDescription | databaseName as string | String | will return the database description. |
descriptions are formatted like | |||
<description>|<bubbleColor>|<databaseSize>|<textColor> | |||
Bubble colors will be one of | |||
• None | |||
• Aqua | |||
• Purple | |||
• Pink | |||
• Orange | |||
• Lemon | |||
• Lime | |||
• Graphite | |||
• Clear | |||
SetDatabaseDescription | databaseName as string | sets the description of the database | |
description as string | requires the HOST password | ||
bubblecolor as string | returns TRUE if the call succeeds | ||
textColor as string | description is the same format as returned by DatabaseDescription | ||
adminPassword as string | |||
DatabaseExists | databaseName as string | will return true if the database exists given | |
adminPassword as string | a valid password | ||
DatabaseList | databaseName as string | will return a string array of database names given | |
adminPassword as string | a valid password | ||
Requires the READ password | |||
DateFormatForDatabase | databaseName as string | will return an integer indicating the selected date format for the database | |
adminPassword as string | given a valid password | ||
Requires the HOST password | |||
date format will be one of | |||
• 0 for date formats like 31 Jan, 1989 | |||
• 1 for date formats like 31 Jan, 1989 | |||
• 2 for date formats like 01-31-1989 | |||
• 3 for date formats like 01/31/1989 | |||
• 4 for date formats like 31.01.1989 | |||
SetDateFormatForDatabase | dateFormat as integer | sets the date format to the supplied format given a valid password | |
databaseName as string | returns TRUE if the call succeeds | ||
adminPassword as string | Requires the HOST password | ||
date format will be one of | |||
• 0 for date formats like 31 Jan, 1989 | |||
• 1 for date formats like 31 Jan, 1989 | |||
• 2 for date formats like 01-31-1989 | |||
• 3 for date formats like 01/31/1989 | |||
• 4 for date formats like 31.01.1989 | |||
EncodingForDatabase | databaseName as sting | returns the TextEncoding for the named database given a | |
adminPassword as string | valid READ password | ||
SetEncodingForDatabase | databaseName as string | sets the database encoding given a valid HOST password | |
theEncoding as TextEncoding | returns TRUE if the call succeeds | ||
adminPassword as string | |||
LogFile | byref log as string | retrieves the log file for the database given a valid HOST password | |
databaseName as string | returns TRUE if the call succeeds | ||
adminPassword as string | |||
SortCharsForDatabase | byref sortChars as string | Boolean | |
byref sortCharCaps as string | |||
databaseName as string | |||
adminPassword as string | |||
SetSortCharsForDatabase | sortChars as string | Boolean | |
sortCharCaps as string | |||
databaseName as string | |||
adminPassword as string | |||
MoneyCharsForDatabase | byref moneyPrefix as string | Boolean | retrieves the money prefix and suffix for the named database |
byref moneyPostFix as string | given a valid HOST password | ||
databaseName as string | returns TRUE if the call succeeds | ||
adminPassword as string | |||
SetMoneyCharsForDatabase | moneyPrefix as string | Boolean | sets the money prefix and suffix for the named database |
moneyPostfix as string | given a valid HOST password | ||
databaseName as string | returns TRUE if the call succeeds | ||
adminPassword as string | |||
SetDateFormatForDatabase | dateFormat as integer | Boolean | |
databaseName as string | |||
adminPassword as string | |||
DateFormatForDatabase | byref dateFormat as integer | Boolean | |
databaseName as string | |||
adminPassword as string | |||
TimeFormatForDatabase | byref timeFormat as integer | Boolean | will retrieve the time format setting for the database |
databaseName as string | requires the HOST password | ||
adminPassword as string | returns TRUE if the call succeeds | ||
timeformat will have 0 for formats like 1:30 PM | |||
and will hold 1 for 24 hr format | |||
SetTimeFormatForDatabase | timeFormat as integer | Boolean | will set the time format setting for the database |
databaseName as string | requires the HOST password | ||
adminPassword as string | returns TRUE if the call succeeds | ||
PortNumberForDatabase | byref portNumber as integer | Boolean | retrieves the TCP/IP port the named database is on |
databaseName as string | requires the READ password | ||
adminPassword as string | returns TRUE if the calls succeeds | ||
SetPortNumberForDatabase | portNumber as integer | Boolean | sets the port the named database will listen on |
databaseName as string | requires the HOST password | ||
adminPassword as string | returns TRUE ifthe call succeeds | ||
RenameDatabase | databaseName as string | Boolean | will rename the named database to the new name if possible |
newDatabaseName as string | requires the HOST password | ||
adminPassword as string | returns TRUE if the call succeeds | ||
RestartProcesses | adminPassword as string | will restart all the OpenBase processes on the host | |
requires the READ password (this is regarded as a bug) | |||
SQLSafeMode | byref safeMode as boolean | Boolean | will retrieve the setting of the SQL Safe mode for the database |
databaseName as string | requires the READ password | ||
adminPassword as string | returns TRUE if the call succeeds | ||
SetSQLSafeMode | safeModeOn as boolean | Boolean | will set the setting of the SQL Safe mode for the database |
cell-content | databaseName as string | requires the HOST password | |
cell-content | adminPassword as string | returns TRUE if the call succeeds | |
SetHostPassword | oldAdminPassword as string | Boolean | will change the HOST password to a new one |
newAdminPassword as string | requires the HOST password | ||
returns TRUE if the call succeeds | |||
SetReadPassword | oldAdminPassword as string | Boolean | will change the READ password to a new one |
newAdminPassword as string | requires the HOST password | ||
returns TRUE if the call succeeds | |||
SimulationMode | byref SimulationModeOn as boolean | Boolean | will retrieve the setting of the Simulation Mode flag |
databaseName as string | requires the READ password | ||
adminPassword as string | returns TRUE if the call succeeds | ||
SetSimulationMode | simulationModeOn as boolean | Boolean | will change the setting of the Simulation Mode flag |
databaseName as string | requires the HOST password | ||
adminPassword as string | returns true if the call succeeds | ||
StartDatabase | databaseName as string | will start the named database if it exists | |
adminpassword as string | requires the HOST password | ||
StopDatabase | databaseName as string | will stop the named database if it exists | |
adminpassword as string | requires the HOST password | ||
TimeoutsForDatabase | byref idleConnectionTimeout as integer | Boolean | retrieves the timeouts set for the database |
byref idleTransactionTimeout as integer | requires the READ password | ||
databaseName as string | returns TRUE if the call succeeded | ||
adminPassword as string | |||
SetTimeoutsForDatabase | idleConnectionTimeout as integer | Boolean | sets the timeouts set for the database |
idleTransactionTimeout as integer | requires the HOST password | ||
databaseName as string | returns TRUE if the call succeeded | ||
adminPassword as string | cell-content | ||
InstallSerialNumber | serialNumber as string | Boolean | attempts to install the serial number to the server |
authorization as string | requires the HOST password | ||
fullName as string | returns TRUE if the call succeeds | ||
company as string | |||
emailAddress as string | This installs a license that is for ALL databases on the server | ||
connectedToInternet as boolean | |||
password as string | |||
OEMLicenseInstall | serialNumber as string | Boolean | attempts to install the serial number to a specific database |
authorization as string | requires the HOST password | ||
database as string | returns TRUE if the call succeeds | ||
password as string | |||
DatabaseList | readPassword as string | String() | retrieves a list of databases on the server you are connected to |
DatabaseExists | databaseName as string | Boolean | returns a boolean whether the named databaes exists on the server |
readPassword as string | |||
AddDatabaseToCluster | databaseName as string | Adds a database as a memebr of a "cluster" for replication | |
adminPassword as string | |||
clusterName as string | |||
frequency as integer | |||
masterHost as string | |||
masterDatabase as string | |||
masterDBLoginID as string | |||
masterDBloginPassword as string | |||
DatabaseClusterMemberInformation | databaseName as string | retrieves cluster member configuration information | |
adminPassword as string | |||
clusterName as string | |||
byref frequency as integer | |||
byref masterHost as string | |||
byref masterDatabase as string | |||
byref masterDBLoginID as string | |||
byref masterDBloginPassword as string | |||
RemoveDatabaseFromCluster | databaseName as string | removes a database from a cluster | |
adminPassword as string | |||
clusterName as string | |||
GetCurrentCluster | databaseName as string | retrieve the cluster the this database is currently a member of | |
adminPassword as string | |||
byref clusterName as string | |||
DatabaseMasterInfo | databaseName as string | ||
adminPassword as string | |||
byref clusterName as string | |||
RemoveDatabaseAsMaster | databaseName as string | ||
adminPassword as string | |||
clusterName as string | |||
SetDatabaseAsMaster | databaseName as string | ||
adminPassword as string | |||
clusterName as string | |||
DistributedKeyForDatabase | databaseName as string | ||
adminpassword as string | |||
byref databaseKey as integer | |||
byref multiplier as integer | |||
SetDistributedKeyForDatabase | databaseName as string | ||
adminPassword as string | |||
databaseKey as integer | |||
multiplier as integer | |||
ServerMACaddress | String | returns the servers MAC address | |
NotificationForDatabase | databaseName as string | Boolean | gets the state of Database Notifications |
adminPassword as string | |||
SetNotificationForDatabase | databaseName as string | sets the state of the Database Notifications | |
adminPassword as string | |||
notificationsOn as boolean | |||
NoDeleteModeEnabled | databaseName as string | Gets whether no delete mode is enabled | |
adminPassword as string | |||
SetNoDeleteMode | databaseName as string | Sets the state of No delete mode | |
adminPassword as string | |||
noDeleteModeEnabled as boolean | |||
AutomaticTriggerFile | automatic() as OpenBaseAutomaticItem | cell-content | gets the current list of automatic items |
databaseName as string | |||
adminPassword as string | |||
SetAutomaticTriggerFile | databaseName as string | sets automatic items for the database | |
adminPassword as string | |||
triggers() as OpenBaseAutomaticItem | see the GUI and Admin sample application | ||
winAdditionalRegressiontests for an example | |||
SetCompressedBackupForDatabase | backupEnabled as boolean | sets whether a compressed backup is created | |
backupTime as integer | on platforms that support this option | ||
backupDay as integer | Backup time is in 24 hour format | ||
backupDir as string | • 12AM = 0 | ||
database as string | • 12PM = 12 | ||
hostpassword as string | Backup day is | ||
• 0 Every Day | |||
• 1 Sunday | |||
• 2 Monday | |||
• 3 Tuesday | |||
• 4 Wednesday | |||
• 5 Thursday | |||
• 6 Friday | |||
• 7 Saturday | |||
SetASCIIBackupForDatabase | backupEnabled as boolean | sets whether an ASCII backup is created | |
backupTime as integer | on platforms that support this option | ||
backupDay as integer | Backup time is in 24 hour format | ||
backupDir as string | • 12AM = 0 | ||
database as string | • 12PM = 12 | ||
hostpassword as string | Backup day is | ||
• 0 Every Day | |||
• 1 Sunday | |||
• 2 Monday | |||
• 3 Tuesday | |||
• 4 Wednesday | |||
• 5 Thursday | |||
• 6 Friday | |||
• 7 Saturday | |||
CompressedBackupForDatabase | backupEnabled as boolean | gets the compressed backup settings | |
backupTime as integer | on platforms that support this option | ||
backupDay as integer | Backup time is in 24 hour format | ||
backupDir as string | • 12AM = 0 | ||
database as string | • 12PM = 12 | ||
hostpassword as string | Backup day is | ||
• 0 Every Day | |||
• 1 Sunday | |||
• 2 Monday | |||
• 3 Tuesday | |||
• 4 Wednesday | |||
• 5 Thursday | |||
• 6 Friday | |||
• 7 Saturday | |||
ASCIIBackupForDatabase | backupEnabled as boolean | gets whether an ASCII backup is created | |
backupTime as integer | on platforms that support this option | ||
backupDay as integer | Backup time is in 24 hour format | ||
backupDir as string | • 12AM = 0 | ||
database as string | • 12PM = 12 | ||
hostpassword as string | Backup day is | ||
• 0 Every Day | |||
• 1 Sunday | |||
• 2 Monday | |||
• 3 Tuesday | |||
• 4 Wednesday | |||
• 5 Thursday | |||
• 6 Friday | |||
• 7 Saturday |