Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an array of OleDbDataAdapter defined like

 

Private DataadAdaptors(MaxTables) As OleDbDataAdapter

 

And I first defined the function to handle them like

 

Private Shared Sub DaRowUpdated(ByVal sender As Object, ByVal e As System.Data.OleDb.OleDbRowUpdatingEventHandler)

 

And add the handler like this

 

AddHandler DataadAdaptors(vTable).RowUpdating, New EventHandler(AddressOf DaRowUpdating)

 

I get the following error

 

D:\VB .Net Project\Helpdesk3\Helpdesk3\DataBase.vb(443): Method 'Private Shared Sub DaRowUpdating(sender As Object, e As System.Data.OleDb.OleDbRowUpdatingEventHandler)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.

 

Looks quite easy to solve, doesn�t it?

 

Private Shared Sub DaRowUpdating(ByVal sender As Object, ByVal e As System.EventArgs)

 

I still use the same line to define the Handler

 

AddHandler DataadAdaptors(vTable).RowUpdating, New EventHandler(AddressOf DaRowUpdating)

 

But now I get this error

 

D:\VB .Net Project\Helpdesk3\Helpdesk3\DataBase.vb(442): Value of type 'System.EventHandler' cannot be converted to 'System.Data.OleDb.OleDbRowUpdatingEventHandler'.

 

Anyone knows how to solve this? I need to intercept the RowUpdating event!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...