Access SQL-Database via ODBC driver in Leapwork

Access SQL-Database via ODBC driver in Leapwork

Introduction
This article includes steps to configure ODBC Driver for SQL SERVER Database.

Prerequisites

  1. ODBC driver with 64-bit version must be installed on your system (install AccessDatabaseEngine_X64.exe from here).
  2. You must be able to access SQL database either by windows authentication or by SQL username and password.

Configure ODBC

  1. Open 64-bit ODBC App in your system.

  2. Click Add.

  3. Select SQL Server (as shown below) and click Finish.

  4. Enter a logical name for ODBC data source, Name is used in database block as "Connection" while accessing the database from Leapwork.

  5. Enter meaningful description. Select the database server you want to connect with, afterward click Finish.

  6. Now next screen is meant for authentication, there can be two scenarios here:

Note: If you choose this option then "Connection" in Leapwork database block should be defined as “ SQL-DB” (as defined in step no 4 above. Please remember there should be No spaces in the before and after connection string).

Note: If you choose this option then the database connection in Leapwork should be defined as “ DSN=TestEnvironment;Uid=UserName; PWD=for_defined_user;”

  1. After selecting Authentication choose the database you want to interact with this ODBC connection as shown below (attach database filename in case it is required) and press next.

  2. Click Finish to complete the process.

  3. After pressing Finish user will see below screen. Press "Test Data Source" to test the connection.

  4. "TEST COMPLETED SUCCESSFULLY!!" message shown below shows that you are ready with connectivity.

  5. Click OK. You are ready to access the database using Leapwork.

If you have any questions, please reach out to our Priority Support team.