Command Line Arguments
- Updated2025-07-21
- 2 minute(s) read
Command Line Arguments
Use the following syntax when writing command line arguments for the Database Viewer application:
DatabaseView.exe [-env environmentfilepath][-connectionstring connectionstringvalue][-connectionfile connectionfilepath][-connectionname name][-sqlfile sqlfilepath][-useexisting]
The Database Viewer application supports the following command line options:
- -env —Specify the path to a .tsenv file following this flag. Use the .tsenv file that defines the environment in which you want to launch the Database Viewer application. Click here for more information about .tsenv files and here for more information about choosing an evironment with the -env command line switch.
- -connectionstring —Specify a connection string value following this flag to launch the Database Viewer and open the connection.
-
-connectionfile
—Specify the path to a
.udl, .accdb, .mdb, or .dbf
file following this flag. The Database Viewer will open the connection specified by the file.
Note Use only one of the -connectionstring or -connectionfile flags at a time.
- -connectionname —Specify a name for the connection following this flag. If you use the -connectionstring or -connectionfile flags and provide no connection name, the Database Viewer will generate a unique name for the connection.
- -sqlfilepath —Specify the path of the .sql file you want to open following this flag. Always use this option in conjunction with the -connectionstring or connectionfile flags. The Database Viewer creates a new Execute SQL Tab and pastes the SQL commands present in the .sql file into the SQL editor. You can execute the commands against the connection specified in the command line argument.
-
-useexisting
—Use this flag to reuse an already-running instance of the Database Viewer, rather than launch a new instance.
Note If a connection that matches the connection specified by the -connectionstring or -connectionfile flags is already open in an existing instance of the Database Viewer, that instance of the connection is reused. The application switches to this connection in the Connection List. A balloon appears near the Connection List to indicate that an existing connection is being reused.