dotConnect for SQL Server Documentation
On this page
    Visual Studio 2015 - 2026 Advanced Integration
    On this page

    dotConnect for SQL Server provides design-time integration with Visual Studio 2015, 2017, 2019, 2022, and 2026 through Data Designer Extensibility (DDEX). This integration lets you manage SQL Server connections in Server Explorer and use Visual Studio's built-in data design tools, including DataSet Designer, Data Source Configuration Wizard, TableAdapter Configuration Wizard, Query Builder, and data preview features. You can also configure the SqlDataSource control in ASP.NET applications.

    This article explains the available integration features and how to use them.

    Note Server Explorer integration is not available in Visual Studio Express editions.

    Integrating with Server Explorer

    Server Explorer is a Visual Studio window for managing server connections and exploring database objects. With dotConnect for SQL Server, you can create connections to SQL Server instances and browse their databases.

    Server Explorer lists database tables, views, stored procedures, and functions. Expand a node to view its columns or arguments.

    Connections created in Server Explorer are also available to other Visual Studio data design tools.

    To open Server Explorer, select View > Server Explorer.

    The Add/Modify Connection dialog lets you create new SQL Server connections and modify existing ones.

    Add Connection dialog

    You can open the dialog in one of the following ways:

    The following table describes the connection settings available in the dialog.

    Setting Description
    Data sourceSpecifies the provider for the connection. To select a different provider or data source, click Change.
    Server nameSpecifies the name or address of the SQL Server instance to connect to.
    AuthenticationSpecifies the authentication method for connecting to SQL Server.
    User nameSpecifies the SQL Server login name. Available for the following authentication methods:
    • SQL Server Authentication
    • Microsoft Entra Password
    • Microsoft Entra MFA
    • Microsoft Entra Managed Identity
    • Microsoft Entra Service Principal
    • Microsoft Entra Default
    PasswordSpecifies the password for the selected SQL Server login. Available for the following authentication methods:
    • Microsoft Entra Password
    • Microsoft Entra Service Principal
    Database nameSpecifies the SQL Server database to connect to.
    EncryptSpecifies the encryption option:
    • Mandatory: Encryption is required for the connection. If the server does not support encryption, the connection fails.
    • Optional: Encryption is used only if the server supports or requests it. Otherwise, the connection is established without encryption.
    • Strict: Encryption is required, and the server's TLS certificate must be validated. The connection fails if certificate validation is unsuccessful.
    Trust Server CertificateTrusts the server certificate during the connection process without validating it against a trusted certificate authority.

    After you specify the connection settings, click Test Connection to verify the connection, then click OK.

    The Advanced Properties dialog provides access to all dotConnect for SQL Server connection properties. Use this dialog to configure advanced options such as pooling or encryption. The Advanced Properties dialog appears when you click Advanced in the Add Connection, Modify Connection, or New Database Reference dialogs.

    Design-time integration with project data

    Data Source Configuration Wizard lets you create and configure data sources for your application. Data sources can be based on databases, web services, or objects and can be bound to controls that display data on forms.

    For Windows Forms applications, the wizard can generate a DataSet and add it to your project. The generated DataSet appears in the Data Sources window, where you can drag its elements onto forms to create data-bound controls. You can further customize the DataSet using DataSet Designer and TableAdapter Configuration Wizard.

    You can open Data Source Configuration Wizard in one of the following ways:

    Data Source Configuration Wizard

    To create a data source:

    1. Open Data Source Configuration Wizard.
    2. Select Database as the data source type and click Next.
    3. Select Dataset and click Next.
    4. Click New Connection, change the data source to SQL Server, enter the connection details, and click OK.
    5. Choose whether to save sensitive connection information in the application configuration file.
    6. Select the database objects to include in the DataSet and complete the wizard.

    After completing the wizard, you can view and modify the generated DataSet in Solution Explorer.

    TableAdapter Configuration Wizard lets you create and configure TableAdapters based on SQL statements or existing stored procedures. The wizard can also create new stored procedures in the database based on the SQL statements you enter.

    A TableAdapter connects to a database, executes queries or stored procedures, and populates a DataTable with the returned data. It can fill an existing DataTable or create and return a new one.

    To open TableAdapter Configuration Wizard, open the DataSet in DataSet Designer, right-click the TableAdapter, and select Configure.

    Parameterized queries let you retrieve data that matches specific conditions without hardcoding values into SQL statements.

    For example, to retrieve customers from a particular city, add a WHERE clause with a parameter to your query.

    SELECT * FROM customers WHERE City = @City

    The @City parameter lets you specify the city when executing the query.

    To create a parameterized TableAdapter query, open the DataSet in DataSet Designer, right-click the TableAdapter, and select Add Query. In the wizard, enter a SELECT statement with a parameter in the WHERE clause.

    Web SQL Data Source Wizard lets you configure data sources for ASP.NET web controls. It provides functionality similar to Data Source Configuration Wizard.

    To configure a data source for an ASP.NET web control:

    1. In Visual Studio, create or open an .aspx page and switch to Design view.
    2. From the Toolbox, drag a data-bound server control, such as GridView, onto the page.
    3. Right-click the control and select Show Smart Tag.
    4. In the control's tasks panel, open the Choose Data Source list and select New data source. If the list is not displayed, click Choose Data Source to open it.

    See Also

    DataSet Wizard  | dotConnect for SQL Server Articles