What you are really looking for is an event provider that can generate
updated/inserted/deleted events. You can then define an event rule in your
subscription that sends information about the rows that were updated to your
notificaiton class.
There are 2 ways your can define your event provider:
1. Can you use the built-in SQL server event provider? This event provider
runs a T-SQL query and returns rows as events. One way to use it is to add a
"Status" column in your table. Whenever you update your table, you will set
the status to column, and the SQL server event provider will return any rows
that have the status of ""updated", "inserted", or "deleted". You can clear
the status fields in the PostQuery defined in the SQL server event provider.
2. If the above does not server you, consider implementing a custom event
provider.
Hope this helps.
[quoted text, click to view] "Wyk" wrote:
> I'm new to NS and SQLServer in general.
>
> How would I write a
> subscription that would trigger an event whenever any row(s) in a table have
> been
> updated/inserted/deleted and provide return those row(s) in the notification
> message?
>
> In other words, can I set up a subscription that triggers an event whenever
> a table's data has been updated and return information of which row(s) those
> were?
>
> Thanks,
> Wyk
>
>
Hi Wyk -
Check out the 4 samples provided with NS setup, particularly the stocks
walkthrough. It does a pretty good job illustrating the dev process.
HTH...
Joe Webb
SQL Server MVP
~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811 [quoted text, click to view] James Wu (MSFT) wrote:
> What you are really looking for is an event provider that can generate
> updated/inserted/deleted events. You can then define an event rule in your
> subscription that sends information about the rows that were updated to your
> notificaiton class.
>
> There are 2 ways your can define your event provider:
>
> 1. Can you use the built-in SQL server event provider? This event provider
> runs a T-SQL query and returns rows as events. One way to use it is to add a
> "Status" column in your table. Whenever you update your table, you will set
> the status to column, and the SQL server event provider will return any rows
> that have the status of ""updated", "inserted", or "deleted". You can clear
> the status fields in the PostQuery defined in the SQL server event provider.
>
> 2. If the above does not server you, consider implementing a custom event
> provider.
>
> Hope this helps.
>
> "Wyk" wrote:
>
>
>>I'm new to NS and SQLServer in general.
>>
>>How would I write a
>>subscription that would trigger an event whenever any row(s) in a table have
>>been
>>updated/inserted/deleted and provide return those row(s) in the notification
>>message?
>>
>>In other words, can I set up a subscription that triggers an event whenever
>>a table's data has been updated and return information of which row(s) those
>>were?
>>
>>Thanks,
>> Wyk
>>
>>
Don't see what you're looking for? Try a search.