Connect Microsoft Visual Studio to Salesforce

This topic describes how to connect Microsoft Visual Studio to a Salesforce database using the ODBC driver.

Visual Studio is a powerful development environment that provides tools for editing, debugging, and compiling code, as well as creating applications. These applications can connect to databases and services on a local machine, across a network, or in any cloud environment—private, public, or hybrid. To connect Visual Studio to a data source such as Salesforce, you can use Devart ODBC driver for Salesforce.

Create a DSN for Salesforce

Before you start, you need to configure a DSN for Salesforce in the ODBC Data Source Administrator. It’s required to establish a connection to an ODBC database in Visual Studio. You can find the instructions for your OS in the following topics:

  • Configure a Windows DSN for Salesforce.
  • Create a DSN on macOS.
  • Create a DSN on Linux.

Connect Visual Studio to Salesforce

1. Open Microsoft Visual Studio.

2. Open Server Explorer: On the View menu, select Server Explorer.

3. In Server Explorer, right-click Data Connections and select Add Connection.

4. In the Choose Data Source dialog, select Microsoft ODBC Data Source and click Continue.

Connect Visual Studio to Salesforce - Select Data Source

5. In the Data source specification section, select your Salesforce DSN from the Use user or system data source name dropdown list.

6. Optional: Click Test Connection to verify connectivity.

Connect Visual Studio to Salesforce - Test Connection

7. Click OK.

The new connection appears under Data Connections in Server Explorer.

Connect Visual Studio to Salesforce - Connection created