"Shyam Pather [MSFT]" <spather@online.microsoft.com> wrote in message
news:%23CIMUhkNFHA.2964@TK2MSFTNGP10.phx.gbl...
> Mike,
> You can certainly do it either way, but I think Choice 1 would be simpler.
> You don't need to duplicate the chronicle in all 6 event classes. You can
> just keep 1 chronicle (put it in whichever event class definition you
> like)
> and use that to scope data your SQL provider query selects for all 6 event
> classes.
>
> The tie between chronicles and event classes is loose. There's nothing
> that
> enforces that the data you keep in a chronicle MUST be tied to the event
> class in which it's defined (though that is the case in many scenarios,
> which is why the chronicle declaration appears in the event class).
>
> Another way of looking at it is that any table can be used to store the
> last
> run time of your SQL provider - it doesn't even have to be a chronicle.
> The
> example in my book uses a chronicle table because SQL-NS gives you a
> convenient way to create the table at the time the app is created. You can
> even use a table in another database if you wish, just as long as it can
> be
> read/updated by the SQLProvider query.
>
> Hope this helps.
> -shyam
> --
> Learn more about SQL-NS:
>
http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/ > ---------------------------------------------
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
>
http://www.microsoft.com/info/cpyright.htm. > ---------------------------------------------
> "Mike Read" <mike.read.spam.no@allwaresolutions.com> wrote in message
> news:O2PhmLjNFHA.2356@TK2MSFTNGP14.phx.gbl...
>> I am developing my first Notification Services Application. I am using
> the
>> book Microsoft SQL Server 2000 Notifications Services by Shyam Pather for
> my
>> guidance in this first application. My application has 6 events that
> would
>> fire a notification. Each subscriber could be affected by one or more of
>> the events.
>>
>> In the book he uses the SQLProvider by to read the last run time and then
>> changes this time to the current and executes a query to get all the new
>> records affected since this last runtime. In order to do this he created
> an
>> Chronicle in the Event Class to create the Last run time table and
>> initialize it.
>>
>> My problem comes with how i should design the SQLProvider section. I see
> 2
>> choices.
>>
>> Choice 1:
>> Create one SQLProviderSection and have the query within fire off all
> the
>> select statements to satisfy all 6 events. This query is easy enough but
>> how do I handle the Chronicle required, does the Chronicle need to be in
>> each of the 6 events and if so does the runtime table created need to be
>> defined in each.
>>
>> Choice 2:
>> Create a SQLProviderSection for each of the 6 events and have each
>> one
>> have it's own chronicle. The problem i see with this is that. The
> problem
>> with this is that each event would have it's own start and end runtime
> which
>> would make it difficult for the subscribers to be able to know how the
>> notification schedule works.
>>
>> Like i said earlier, this is my first attempt at a notification services
>> application, so i know my design possibly is the most effective, but the
>> first attempt at a new service never is. So i am asking for advice and
>> suggestions on what is the best way to handle this situation.
>>
>> Thank you,
>> Mike
>>
>>
>
>