Polling SQL Server by Using the SQL Adapter with WCF Service Model
You can configure the SQL adapter to receive polling-based data-changed messages from SQL Server. You can specify a polling statement that the adapter executes to poll the database. The polling statement can be a SELECT statement or a stored procedure that returns a result set. Based on the type of polling message received, the adapter exposes different polling operations:
- Polling. This operation returns a data set as part of the polling message.
- TypedPolling. This operation returns a strongly-typed polling message.
- XmlPolling. This operation returns the polling message as an XML message. You must use this operation if you want to use SELECT statements or stored procedures that use the FOR XML clause to return data as XML messages. For more information about the FOR XML clause, see http://go.microsoft.com/fwlink/?LinkId=131402.
For more information about these polling operations, see Support for Polling.
|The SQL adapter enables adapter clients to have a single application with more than one Polling or TypedPolling operations for the same database or table. To support such a scenario, the adapter includes a unique ID— InboundID—in the connection URI. This ID, when added to the connection URI, makes it unique, thereby enabling multiple polling operations in a single application.|
The topics in this section provide instructions on how to use both Polling and TypedPolling operations in a .NET application.