Connect to SQL Server DB using ODBC and Data Source Name (DSN)

Visual Expert allows you to analyze Transact-SQL code directly from your SQL Server database. This guide explains how to configure the Visual Expert connection to your SQL Server DB using ODBC and Data Source Name (DSN).

Case 1: Connect using ODBC

  1. Open Visual Expert, click [New] on the ribbon menu to open the "Create Project" wizard.
    Select [Transact-SQL] in the next pop-up.
    Select Transact-SQL
  2. Click on [SQL Server Database] in the SQL Server DB connection page.
    Click on SQL Server DB
  3. Click on [ODBC] radio button.
    From the ODBC drivers dropdown, select the appropriate ODBC drivers for SQL Server.
    Select ODBC Radio Button
  4. Enter Server Name, Authentication type, User ID and Password.
    Enter Server Credentials
  5. Click on [Test Connection].
    Once connected successfully, select a "Database Name" from the dropdown list to analyze.
    Click [Next] and follow the wizard to analyze the added source code.
    Select DB Name to proceed

Case 2: Connect using Data Source Name (DSN)

  1. You need to create a Data Source Name. Open the "ODBC Data Sources" on your PC.
    Open ODBC Data Sources
  2. The ODBC Data Source Administrator will open on your screen. Click on [Add].
    Add dBase Files
  3. Select the appropriate ODBC drivers for SQL Server. Click on [Finish].
    Select SQL Server Drivers
  4. Enter the DSN name, description and Server name. Click on [Next].
    Enter DSN Credentials
  5. Select your preferred authentication type and enter the required credentials. Click on [Next].
    SQL Server authentication
  6. Click on [Next] to proceed.
    Create DSN - Next Step
  7. Click on [Finish] to complete the configuration.
    Create DSN - Finish Configuration
  8. Click on [Test Data Source] to check the SQL Server connection.
    Test Data Source
  9. Once the connection is tested successfully, click on [OK].
    SQL Server ODBC Test Successful
  10. Click [OK] to close the ODBC SQL Server Setup window.
    Close SQL Server ODBC Setup
  11. You will see that the newly created DSN is added to the Data Source Administrator.
    SQL Server authentication
  12. Open Visual Expert. Select the [Data Source Name] radio button as connection type.
    Enter the Data Source Name, Authentication type, User ID and Password. Click on [Test Connection].
    Once connected successfully, select the database from the dropdown list and proceed with the project creation.
    SQL Server authentication

More from VE Configuration

 

Visual Expert 2021, Configuration, SQL Server Database, ODBC, Data Source Name (DSN)