The ADO Query action enables you to execute a SQL statement against an ADO database connection

On this page:

 

Query

Connection String

Specify a connection string to your ADO data source.  You can use the built in connection string builder to create and test your connection string.

SQL

Either specify a file containing SQL, or specify the SQL statement in the text field

SQL statement from file

The file from which to load the SQL statement to run. This file require read permissions of the user running the Automise script. The file should contain a single valid SQL statement which can be run against the database in question. Only the filename itself will have Automise expressions expanded, the text the file contains will be read as is.

Text Query

The test of an SQL statement to run. Automise expressions will be expanded on the first iteration. 

Output

SQL Output

Choose if you want the results output to the FB log, or to and XML file using the ADO XML file format.

Output to file

Specify this option to choose writing the output to a supplied file. The file and folder it is contained in need to be writeable by the user running the Automise script. 

Output to log

Specify this option to simply write the output to the build log file. 

Options

Fail if 0 records found or 0 rows affected

The action will be failed if no rows are returned or affected by the SQL statement provided. Helpful for detecting that there are errors in either the database or SQL statement itself. If SQL statement is expected to return zero rows on some occasions then leave this option off.  

Output SQL query to log

Simply writes the resulting query to the build log. Helpful for knowing the value of any variables which were used in the generation of the SQL query to run. 

Timeout seconds

The number of seconds to wait before timing out and failing the action. 

  • No labels