TSTool / Command / OpenDataStore
Overview
This command has initially been developed to work with SQLite. Support for other databases will be added and tested over time.
The OpenDataStore
command dynamically opens a database datastore.
This command is useful for a dynamic database connection that does not need to be open
throughout a TSTool session, such as when working with SQLite file database.
If a matching open datastore exists, it will by default be closed before the datastore is reopened.
See also the
CloseDataStore
command.
Datastores that are needed throughout a TSTool session should be configured with a datastore configuration file to connect at startup, which allows TSTool to initialize main user interface query filters.
The status of datastores can be shown in TSTool using the View / Datastores menu as shown in the following figure (the Status Message column on the far right, not visible in the figure, provides additional information about the datastore):
Datastore Information from View / Datastores (see also the full-size image)
Command Editor
The following dialog is used to edit the command and illustrates the syntax of the command.
OpenDataStore
Command Editor using Properties (see also the full-size image)
OpenDataStore
Command Editor using Configuration File (see also the full-size image)
Command Syntax
The command syntax is as follows:
OpenDataStore(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
DataStoreName |
The name of the database datastore to open. | None – must be specified. |
DataStoreDescription |
The description of the database datastore to open. | DataStoreName |
DataStoreType |
The datastore type, which indicates the software interface to use for the database, currently limited to:
|
GenericDatabaseDataStore |
DatabaseEngine |
The database software:
|
SQLite |
ServerName |
Database server name as recognized name on network or IP address. Additional details for DatabaseEngine are:
|
None - must be specified |
DatabaseName |
Database name. Additional details for DatabaseEngine are:
|
|
Login |
Login for account used to connect to the database, may be a shared service account. Additional details for DatabaseEngine are:
|
|
Password |
Password for account used to connect to the database, may be a shared service account. Additional details for DatabaseEngine are:
|
|
IfFound |
Action to be taken if an open datastore is found:
|
Close |
Examples
See the automated tests.
Troubleshooting
See Also
CloseDataStore
commandNewSQLiteDatabase
command