Skip to main content

Connect to SQL Databases

The WinForms Designer allows you to connect to different types of SQL databases in the Data Source Wizard. Follow the steps below to establish a connection to a database:

  1. Select the database type in the Data Source wizard to connect to a database. Then, specify connection parameters. For more information on how to connect to different types of SQL databases, refer to the following tutorials:

  2. Register a data connection in the application’s configuration file. For this, add a connection string to the connectionStrings section.

    <connectionStrings>
        <add name="nwindConnection" connectionString="XpoProvider=MSSqlServer; data source=localhost; initial catalog=Northwind; integrated security=SSPI;" />
      </connectionStrings>
    

    This connection is displayed for users in the Data Source wizard when they create a new data source.

    DataSourceWizard_NewOrExistingConnection

    For more information, refer to the Register Default Data Connections help topic.

See Also