Opus Pro provides the ability to connect to a database. Please note that it is intended to provide an easy route to display the contents of individual records and not huge lists of records. Nor should it be seen as a replacement for dedicated tools for more sophisticated database programming requirements.
Note:
A full description of databases is provided in the main Opus Help file. To open the help, click on Contents & Index option in the Help menu at the top of the Opus Editor. Search for the word databases in the Index tab of the help file for more information.
The Database OpusScript functions are unique to Database objects created in a script. In other words, you must create a new Database object in your script that references a DSN, before you can use the OpusScript Database functions.
Below are three examples, showing you how you can create a new Database object:
var myDB = new Database("FILEDSN=d:\\catalogue.dsn;")
var myDB = new Database("FILEDSN=catalogue.dsn;")
var myDB = new Database("DSN=catalogue;")
Hierarchy:
Only the specific functions listed under the Functions: heading below can be used with Database objects:
Class Hierarchy:
Database
Functions:
Turn AutoCommit on or off for a database | |
Commit to database – permanently stored on database | |
Connect to SQL server | |
The SQL database command to execute | |
Go to First record in record set | |
Get current record number in record set | |
Identify quote character required for table or field names containing spaces | |
Get the last database error message | |
Get total number of records in record set | |
Go to a specific record number in a record set | |
Go to a specific record number relative to current number | |
Check if AutoCommit is on in a database | |
Go to Last record in record set | |
Go to Next record in record set | |
Go to Previous record in record set | |
Go back to point in database before changes were made or last commit sent |