Add a database connection
This task describes how to add a database connection step through the Tree view.
To add a database connection:
-
Open Solution Explorer: Select View > Solution Explorer.
-
Select the required section: vuser_init or Action. To avoid repeating the connection sequence in every iteration, place it in the vuser_init section.
-
Select Design > Insert in Script > New Step. Choose the lr_db_connect step. The Database Connection dialog box opens. Specify a Step Name, Connection Name, and Data Provider, OLEDB or SQL.
-
Create a database connection string:
-
Click Connection String Generator to generate a database connection string specific to your environment.
-
Indicate the connection properties:
-
Server Name
-
Database Name
-
Authentication method: Windows Authentication or User/password.
-
Username and Password
-
Click Test Connection to verify that the information you provided is correct.
-
Select an SQL Provider, OLEDB or SQL, and click Generate.
-
-
Verify function in the script
Check that an lr_db_connect function was written to the script.