-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Hello,
I included the class SqlDependencyEx, the trigger creation and removal works very well, thank you.
Unfortunately, the change event is not recognized. When I look at the method ReceiveEvent(), reader.IsDBNull (0) = true in any case.
I use vb.net and add SqlDependencyEx with
_SQLListener1 = New SqlDependencyEx(MySQLString, _ApplicationConfig.Config.ArchiveDatabaseName, "tbRezept")
AddHandler _SQLListener1.TableChanged, AddressOf Me.SQLDatabaseTableChanged
SQLListener1.Start()
The EventHandler actually does not very much,
Private Sub SQLDatabaseTableChanged(sender As Object, e As ServiceBrokerListener.Domain.SqlDependencyEx.TableChangedEventArgs) 'some Stuff like a counter to count how often the function was called End Sub
The database table has other triggers. Can that be the reason? Is the inserted table no longer available for the SQLDependenyEx after the first trigger has expired?
An additional question: Now I'm trying to modify SQL_FORMAT_CREATE_NOTIFICATION_TRIGGER.
There is the line
IF EXISTS (SELECT * FROM sys.services WHERE name = '{3}')
What is it necessary for? If I delete it, it seems that the code is working.
Ottilie