execute sql

Description

Execute an SQL command against the database currently in use.

Arguments

Notes

Applicable Built-In Settings

The following settings are applicable to this action: remove double quotes from cell, standard ASCII only.

Applicable Controls

This action is applicable to the following controls: none.

Example - Case 1: Running an SQL command to get a single result

The following example retrieves the CName field from the CTable table of the CustDB database for a CID of 102 , then checks the returned value against the expected value, Roberto Dylando.

Action Lines

Result

Example - Case 2: Running an SQL command to get multiple results

In this example, the execute sql action is used to execute a stored procedure, rather than a direct SQL query. The stored procedure then executes two SQL queries, returning two result tables, each of which is capture to a data set. The contents of the data sets are then written out to two text files.

The stored procedure looks like this:

Action Lines

Result

The resulting text files appear as follows:

July_shipments.txt

1998_Beverage_sales.txt

Related concepts

Testing with databases


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400