Command Line Syntax

The syntax for running command line options is described as follows:

WinSQL <filename> | <option-Value>

·filename: This is the name of a text file holding the SQL script. This will just open the text file in the editor but will not run it.

·option-Value: Using these pair of option-value, you can run an SQL query against the database. Refer the following table for a complete listing of the options.

The following table describes of the available options:

 

Option

Value

Description

-a

NULL

Close WinSQL Professional automatically after the task is complete.

-d

DSN Name

Contains the name of the ODBC DSN. If there is a space in the name, it must be enclosed in quotes.

-g

NULL

Runs WinSQL Professional in debug mode. Will create a debug.log file that can be used to pin point any potential problem.

-o

Output file

This file is used to store any error messages or data returned from the server as a result of a query execution. If this option is not specified, there will be no output generated.

-q

Query File

Name of the file that holds the SQL query.

-p

Password

User password for database connection

-u

User Name

User name for database connection

-x

Export template

Name of the export template file.

-h

Publish HTML

Name of the HTML template file.

-?

NULL

Displays a help dialog box displaying all the command line options