Share via


Readme_ServiceBrokerInterface

This sample shows one way to build an object-oriented programming interface for Service Broker applications. The sample contains classes that encapsulate the details of sending and receiving messages by using the Service Broker DML. This sample forms the foundations for other sample applications included with the SQL Server 2005 samples.

The sample includes two different approaches to message dispatch. An application that uses this sample can use an attribute-based approach for message dispatch, or the application can implement a message processing loop.

By default, the Shopping Cart sample application is installed at C:\Program Files\Microsoft SQL Server\100\Samples\Engine\\ServiceBroker\ShoppingCart. If the sample folder is not present, see Installing Samples.

Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples. Sample applications and assemblies should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.

Building the Sample

  1. Open the solution file Service Broker Interface.sln in Visual Studio 2005. This file is located in the cs directory in the ServiceBrokerInterface directory.

  2. Build the solution by pressing F6, or by selecting Build Solution from the Build menu.

Using the Sample

  1. Build the sample as described earlier.

  2. Add a reference to the assembly Microsoft.Samples.SqlServer.dll.

  3. In your code, add a using directive (C#) or Imports statement (Visual Basic) for the namespace Microsoft.Samples.SqlServer.

Requirements

This sample requires Visual Studio 2005. Because the sample uses features of the common language runtime that were not available in earlier versions, versions of Visual Studio earlier than 2005 cannot build the sample.

Demonstrates

This sample demonstrates one way to represent Service Broker DML in a .NET language.

Change History

Release History

5 December 2005

Changed content:
  • Changed instructions for generating a key file, including the name and location of the key file.