Now, to test these events you can write code that fills a dataset and calls the update method of data adapter.
The Fill Error Event Handler is as follows: Row Updated and Row Updating are two more events that a data adapter supports.The Row Updating event occurs when an Update method is called before a command executed against the data source.The Row Updated event occurs when a command executed.Ok, now it's time to write an application to test the data adapter events.Now you can write code on the Fill Error event handler.
You call the Fill Error event handler when the Fill method of data adapter of data adapter fails.
Listing 9-4 and 9-5 show the code for the Row Updated and Row Updating event handlers.
You call the Row Updated event handler when a row is updated using the Update method of a data adapter, and you call Row Updating when a row is updating.
As you can see from Listing 9-5, you can compare the Statement Type member of Ole Db Row Updating Event Args to the Statement Type enumeration to find out the statement type.
The Statement Type enumeration defines Select, Insert, Update, and Delete members.
Fill Error = new Fill Error Event Handler(da_Fill Error); Data Set ds = new Data Set(); da.