ADO.NET OnRowChanged

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I've developed an application that uses DataSet's for data storage. Now
I had this idea to make things easy that I could hook into the
DataTable's OnRowChanged delegate to know when to Update the dataset. So
when a OnRowChanged is fired I connect to my local database and invoke
Update on the dataset. Only problem is while in the callback the row hasn't
actually been added to the dataset back. So what again is the different
between OnRowChanged and OnRowChanging?
This is very fustrating. I dont like having to explicitly Update my
database everyplace I decided to change the data, but hey I'm kind of now
using the disconnected 'feature' of DataSet's. :)

- Andrew
 
Hi John,

This is a bit unusuall concept.
Why would you need to sync data immediately?
And yes, RowChanged won't work for you.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com


John Smith said:
I've developed an application that uses DataSet's for data storage. Now
I had this idea to make things easy that I could hook into the
DataTable's OnRowChanged delegate to know when to Update the dataset. So
when a OnRowChanged is fired I connect to my local database and invoke
Update on the dataset. Only problem is while in the callback the row hasn't
actually been added to the dataset back. So what again is the different
between OnRowChanged and OnRowChanging?

Changing occurs before the row is Changed.
 
Back
Top