How do I receive change events for my connection?

  • Thread starter Thread starter Moogy
  • Start date Start date
M

Moogy

I'm using SqlConnection from ADO.NET, building Datasets, and allowing the
clients to manipulate the data using the Datagrid, and then commit the
changes.

I was wondering; is there any way to receive messages through my connection
that another client has updated a 'watched' table? That way if another user
makes changes to the table I am viewing or modifying, I can receive notice
of such changes?

Thanks!

Moogy!
 
well, if you are into ex post facto notification, the good old concurrency
exception should do it for you, but I don't think that's what you are asking
;-). If you are familiar with SQL Server Notification services and happen
to be using SQL Server, you can implement it through there, but it's a
decent amount of work. The other alternative is wait to ADO.NET 2.0..but
the functionality in 2.0 isn't cheap. I've been playing with it and when
they advise you to use it sparingly, they know what they are talking about.

I know the concurrency exception thing sounds lame, but if you send your
updates back and specifically trap concurrency exceptions, you can get
through quite a bit..

HTH,

Bill
 
Bill, could you tell me a bit more about this notification? Are there
either C# or VB.NET code samples floating around showing how to use it?

I can't wait for ADO 2.0, I need to figure out a solution with the current
1.1 framework.

I'm using SQL2K.

Thanks!

MOOGY!
 
Back
Top