Readme_ReviewWatcher
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
The Adventure Works Cycles ReviewWatcher sample for SQL Server demonstrates how to use query notifications. This sample is used in conjunction with the Adventure Works Cycles Storefront e-commerce sample application. This document describes how to install the SQL Server version of the ReviewWatcher sample application.
This sample requires administrator privileges on the server to run correctly.
The default installation directory is C:\Program Files\Microsoft SQL Server\100\Samples\Integrated Samples\Storefront\CS\ReviewWatcher\.
A developer is trying to build an application that displays changes to the database as they happen, without polling the database.
Transact-SQL, Visual C#, and Visual Basic.
The ReviewWatcher sample uses the following features of SQL Server.
Application Area | Features |
---|---|
Overall |
SqlDependency |
Before running this sample, make sure the following software is installed:
- SQL Server, including the following components:
- SQL Server Database Engine
- SQL Server Management Studio
- AdventureWorks2008R2 sample database which is available at the CodePlex Web site.
- Database Engine Samples which are available at the CodePlex Web site.
- .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. See Installing the .NET Framework Documentation.
To build the sample, do the following:
Follow the steps in the readme.htm file for the Storefront sample application.
Note that in SQL Server, Service Broker is disabled in the AdventureWorks2008R2 database. It must be enabled by using the following script for this sample to operate correctly:
ALTER DATABASE AdventureWorks SET ENABLE_BROKER
Build the application in the solution file in the CS folder using Microsoft Visual Studio 2005 or MSBuild.
To run the sample, do the following:
Browse to the Adventure Works Cycles Storefront sample by starting your Web browser and typing https://localhost/StoreCSVS/ in the Address bar.
Using the category/subcategory tree control menu on the left, browse to a subcategory of a product, and then select the subcategory.
Click a product in the list of products displayed.
Using a file browser, locate and execute the ReviewWatcher.exe application, which is typically installed in bin\debug.
Switch back to your Web browser, locate a particular product, and then click Review this Product.
Fill in the text boxes and click Submit.
A summary of the review should appear in the left pane in the ReviewWatcher application.
Selecting the summary line in the left pane displays the contents of the review in the right pane.
To remove the sample, do the following:
- Follow the instructions for removing the Storefront sample located in the Readme file for that sample.
The common language runtime for SQL Server must be enabled for this sample to work correctly.