Welcome to WindowsClient.net | My Blog | Sign in | Join

Windows Client Videos

WinForms: Sql Dependency Cache With Typed DataSets

The video shows how to create an event on .Net Framework’s 2.0 (Visual Studio 2005) SqlDependency Cache to notify the WinForm application that the underlying data has changed. It uses Typed Datasets and demonstrates how to add a partial class to the DataAdapter to expose the SQL Command for use with SQL Dependency.

Technical Note: SqlDependency uses SQL Server Notification Service running on SQL Server 2005/2008 and required SQL CLR enabled on the server. See “Query Notifications in ADO.NET 2.0 by Bob Beauchemin”

By: Pat Tormey

Comments

Pat Tormey said:

An astute reader noted a potential for repeated looping and recommended reading

msdn.microsoft.com/.../aewzkxxh.aspx

For full details before planning and SQL Dependency Projects

Pat

# May 22, 2008 11:21 AM

Bhaskarg said:

I didnt see the No of times changed count go up ! Where 's the notification going ?

# September 19, 2008 10:48 AM

Mobeen Riyaz said:

The C# code for this project does not unzip properly.

# September 25, 2008 12:51 AM

WCastroL said:

For some reason every time there is a change on the database the datagridview selects the first row. No matter what row is selected as soon as there is a notification from the sql sever and the dataset is filled the datagridview sets the position on the first row. I don't thing this is the way it was meant to be.

Do you know what could be causing this problem?

Thank you

Bill

# November 7, 2008 10:09 PM

Pat Tormey said:

Mobeen,

Please try again. It's working now so you must have had a download problem,

If it still happens drop me a note

Thanks

Pat

PTormey@4square.net

# November 18, 2008 6:53 AM

Zephyrus said:

Where is the video?

# January 28, 2009 5:41 AM