use database

以下のSQLアクションラインを適用するデータベースを指定します。
名前説明タイプ修飾子
name

データベース接続の名前。(以前にアクション connect database を使用して確立されたもの)

Stringなし
なし
次の設定はこのアクションに適用可能です:  remove double quotes from cells.
次の例は、テスト内からデータベースに接続して使用するプロセスを示しています。名前付きの接続文字列を作成し、それを使用してデータベースに接続した後、テストで使用するアクティブなデータベースを指定するために use database を呼び出します。
                                
                                    	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	

                                
                            
  • このアクションは、一般的にテストがデータソースにアクセスできるようにする一連のアクションの一部として呼び出されます。(詳細についてはデータベースを使用したテストを参照してください)
  • このアクションは修飾子 <ignore> をサポートしています。引数の値として <ignore> が存在するか、引数に <ignore> に評価される式が含まれている場合、そのアクションは実行中にスキップされます。

Copyright © 2023 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(800) 322-0333