Notifying Administrators of Error Conditions
OpenBase has a built in notification system that allows applications and stored procedures to send messages to system administrators via a central notification system. Alerts can set the database error light on the OpenBase Manager so an administrator will know to look at the log.
These examples use openisql to send the SQL to the database. However, you can use any programatic means to send the commands to the server.
openbase 1> ALERT MESSAGE "This is a message" openbase 2> go
This allows the application to write a time-stamped message to the log. This could be used to record an event that happened in a stored procedure or application which does not require attention. The OpenBase server uses these type of messages to post activities such as dropping a table or creating a table. An application could send a message to the log to record the fact that a report was done or that a maintenance procedure was performed correctly — in case someone is interested at some point in the future.
openbase 1> ALERT WARNING "This is a warning highlighted in blue" openbase 2> go
A warning is displayed in blue and represents a message that a database administrator should be aware of, but is not critical or worth immediate attention. When a warning is written to the log the Message Log button on the OpenBase interface will change slightly indicating that there is a warning condition waiting to be viewed. SQL errors are listed as warnings in the Message Log file.
openbase 1> ALERT ERROR "This is a error highlighted in red" openbase 2> go
An error is highlighted as red in the log and will give an administrator a different button light on the Message Log button. These would indicate error conditions that require attention. This is a way to alert your administrator of an error condition in your software which may require attention.
openbase 1> ALERT SEVERE "This is a severe error highlighted in red with yellow background" openbase 2> go
A severe error message turns the log message button red indicating that there is a serious condition that requires immediate attention.