Skip to content

TSTool / Command / CloseDataStore


Overview

The CloseDataStore command closes a datastore’s database connection. Closing the connection will cause subsequent interactions with the datastore’s database to fail. This command is used to simulate dropped database connections (for example when TSTool does not read from or write to database for a period due to user inaction). Some database datastores have been updated to auto-connect to the database when the connection is dropped.

The command can also be used with commands that dynamically open datastores, including the following commands:

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):

View_Datastores

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.

CloseDataStore

CloseDataStore Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:

CloseDataStore(Parameter="Value",...)

Command Parameters

Parameter                Description Default                           
DataStore The name of a database datastore to read. None – must be specified.
StatusMessage A status message to display when the datastore information is viewed. The status may be reset if the connection is automatically restored, for example when a subsequent database interaction occurs. Message appropriate for closing the datastore.

Examples

See the automated tests.

Troubleshooting

See Also