Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
I got a table in MSSQL which keeps updated almost every second from another software (Stock Prices).

I need to create a WPF Application with a grid that shows a View from MSSQL. (view is just a complex query with inner joins on the stock table and some other tables).

But since the View keeps updated, I can't really do "SqlDataAdapter.Fill(ds)" every second.

So far; I've heard about the following techniques..

SQL-Dependency
Push Subscription combined with Bindable-LINQ
SQL StreamInsight.
SQLstream.com

Which one is the proper way to achieve this?

Thanks
Posted

1 solution

Using triggers, write the affected entity ids to a push notification queue table
Using SQL service broker, send notifications from the queue table to a notification server to which all end clients are connected
Distribute push notification events for batches of affected entityids from the notification server to all connected clients
The client re-enquires against the view for the affected entities and updates the UI accordingly (remove any deleted, update any changed, insert any new)
It works well.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900