I'm trying to write a vb.net application that usesSqlDependency
. The dependency will be triggered when data is added to the database. I'm wondering if it's possible to have the dependency return the data/query that triggered it.
Currently i have to have the onchange
event trigger a select statement to refresh the data i have cached. Is it possible to just have the dependency return the new data that triggered it
i.e. the following is added to a table, the table has 2 fields (id, data)
id: 1
data: hello
When this is added the dependency onchange event will be fired and
id: 1
data: hello
will be returned