use database

Specify a database against which the ensuing SQL action lines are to be applied.
NameDescriptionTypeModifier
name

Name of the database connection (previously established via the connect database action).

StringNone
None
The following settings are applicable to this action: remove double quotes from cells.
The following example illustrates the process of connecting to, and using a database from within a test. After creating a named connection string and using it to connect to the database, invoke use database to specify the active database to be used by the test.
                                
                                    	variable	driver	host
create connection string	Northwind_conn_strg	SQL Server	lgdn15031-w7d01
&nbsp			
	port	database name	username
>>>		Northwind	
&nbsp			
	password	others	
>>>		Trusted_Connection=Yes	
&nbsp			
	connection string	name	
connect database	#Northwind_conn_strg	Northwind_conn	
&nbsp			
	name		
use database	Northwind_conn		
&nbsp			
	command	result	
execute sql	select ContactName from Customers where CustomerID='ABOUT'	contactname_ds	

                                
                            
  • This action is generally invoked as part of a sequence of actions to allow the test to access a data source. (See Testing with databases for more information)
  • This action supports the <ignore> modifier. If the string <ignore> is present as the value of the argument, or the argument contains an expression that evaluates to <ignore>, the action is skipped during execution.

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