Fill Error = new Fill Error Event Handler(da_Fill Error); Data Set ds = new Data Set(); da.code to set up the data adapter // add the event handlers da.So, with the use of Extension Methods, I added two new methods to the Db Data Adapter abstract class that will allow the adding of event handlers for those two specific events, and here is my implementation (edited 4/23/2013 for handling of instance or static handler methods): I'm using the base Row Updated Event Args & Row Updating Event Args for the event arguments that get returned to the delegate, so if you need provider-specific members that are only available through the provider defined classes that are derived from the above two base event args classes, then they will need to be cast to those classes. Otherwise, it works fine, and now I have provider-independent event handlers available from the Db Data Adapter class (which is how Microsoft should have implemented them to begin with). ''' Public Delegate Sub Row Updating Event Handler(sender As Object, e As Row Updating Event Args) Public Module Db Data Adapter Extension Sub New() End Sub Private Function Get Event(event Name As String, type As Type) As Event Info Return type. I'm currently working on a program that allows for connections to multiple provider specific databases, so obviously I'm using the non-provider-specific classes (in System. Common) to work with these various connections once the connection or data adapter has been instantiated through the use of the provider's implementation. However, I wanted to make use of the Row Updated and Row Updating events that are supposedly a part of the Data Adapter base class according to MSDN (
Whilst one can subscribe to the tableadapters underlying adapter in the tableadapter partial class I find you cannot easily initialise it without having to remember to call an initialisation of your own.I've put a bounty on this question because it's a problem I have had regularly since the days of 1.1 and I feel there must be a better solution to this than hacking the table adapter after I instantiate it. However you can use the extended method to wrap the Row Updated event and expose it to other classes (ie My Row Updated) The extension I have a possible alternative. The code below is to resolve my particular issue with SQL CE to be able to update IDs on the table.adapter has a Fill Error event that occurs during a fill method.It allows a user to determine whether a fill operation should continue.