Editar

Partilhar via


Connect to SQL Server in Visual Studio using the SQL adapter

This section provides instructions about how to use the Consume Adapter Service Add-in, the Add Adapter Metadata Wizard, and the Add Adapter Service Reference Plug-in.

  • The Consume Adapter Service BizTalk Project Add-in is available in BizTalk Server projects and is installed as part of the WCF LOB Adapter SDK installation. You use the Consume Adapter Service Add-in to generate message schemas (XSDs) for operations that you want to target in your BizTalk solution. For more information about developing solutions with BizTalk Server, see Develop BizTalk applications using the SQL adapter.

  • The Add Adapter Metadata Wizard is available in the BizTalk Server projects and is installed as part of the BizTalk Server installation. You use the Add Adapter Metadata Wizard to generate message schemas (XSDs) for operations that you want to target in your BizTalk solution. For more information about developing solutions with BizTalk Server, see Develop BizTalk applications using the SQL adapter.

    Note

    Because the SQL adapter is exposed both as a WCF-Custom binding and as BizTalk adapter, you can use either the Consume Adapter Service Add-in or the Add Adapter Metadata Wizard from a BizTalk project to connect to SQL Server.

  • The Add Adapter Service Reference Visual Studio Plug-in is available in non-BizTalk programming projects. You use the Add Adapter Service Reference Plug-in to generate a WCF client class or a WCF service callback interface when you develop solutions using the WCF service model. For more information about developing solutions with the WCF service model, see Develop SAP applications using the WCF Service Model.

    To use the Consume Adapter Service BizTalk Project Add-in, Add Adapter Metadata Wizard, or the Add Adapter Service Reference Visual Studio Plug-in, you must first connect to SQL Server. All three methods present a dialog box through which you configure a connection by setting the following:

  • Connection parameters. These are the parameters that are used to build the connection URI such as the SQL Server name, the database instance name, and the database name.

  • User name password credentials for SQL Server. These are used to authenticate you on SQL Server when the connection is established. You must specify a user name and password.

  • Binding properties. Binding properties are optional, and whether you specify them depends primarily on whether you target operations that require specific binding properties to be set. For more information about binding properties, see Read about the BizTalk Adapter for SQL Server adapter binding properties.

    At a minimum, when you configure the connection to SQL Server, you only have to specify binding properties and connection parameters that are needed to establish the connection and that affect the metadata returned by the SQL adapter for the operations you want to target. However, you might also want to specify values for any additional binding properties and connection parameters that will be used at run time. This is because:

  • The Consume Adapter Service Add-in creates a BizTalk port binding file from the binding properties and connection parameters that you specify when you configure the connection and adds this file to your project.

  • The Add Adapter Service Reference Plug-in creates an app.config file from the binding properties and connection properties that you specify when you configure the connection and adds this file in your project directory.