ODBC Driver for SQL Server

Connecting Microsoft Visual Studio to SQL Server via ODBC Driver

Importing SQL Server Data into Visual Studio Through an ODBC Connection

A Visual Studio is a powerful tool containing features that allow editing, debugging, and compilating the code and creating applications that can be connected to any databases product and services on a local machine and network, and any type of cloud (private, public, or hybrid). To connect Visual Studio to a data source such as SQL Server, you can use an appropriate ODBC driver.

This guide describes how to connect to SQL Server and retrieve data importing them to Visual Studio with an ODBC driver. It is assumed that you have already installed and configured a DSN for ODBC driver for SQL Server.

  1. Run Visual Studio Desktop and click Tool and select Connect to Database.
  2. In the Add connection dialog box, select the Microsoft ODBC Data Source as a data source.
  3. In the Data source specification point expand the Data Source Name (DSN) drop-down list and select the previously configured DSN for SQL Server. Alternatively, you can connect to the database by entering the DSN in a Use connection string field. To check whether your connection is successful, click Test connection. Click OK.
  4. If your data source is password-protected, Visual Studio will prompt you for user credentials. Type your Username and Password in the respective fields and click OK.
  5. In the Server Explorer you can see the database structure. Choose Tables, right-click the table you want to view the data of and select Retrieve Data. You can also preview the contents of the database objects by clicking on them.
© 2015-2024 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback