Richard,
You will have to write your own custom event provider, but inside it you can
use the FileSystemWatcher class that the .NET framework provides. THis is
the same class that our built-in NS FileSystemWatcher Event provider uses
internally. You can configure it to watch a directory for any type of file
and invoke a callback when a file is added (or modified, as you choose). You
can then open the file and submit the appropriate events into your NS
application.
Chapter 8 of my book
(
http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/ ) provides
detailed explanations and code samples for building custom event providers.
Hope this is helpful.
-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. ---------------------------------------------
[quoted text, click to view] "Richard" <Richard@discussions.microsoft.com> wrote in message
news:5C92284A-F958-4EB4-8F38-20F67BC4916A@microsoft.com...
> Can anyone point me in the direction of a custom filesystem watcher that
> watches for files other than XML?
>
> The situation I have is files coming into folders where they then have to
be
> loaded in SQL Server. The files will not be XML files (and I can't specify
> that they should be). I need a watcher to watch for the existence of the
file
> and then kick off a stored procedure/DTS. I have a custom event provider
to
> fire a stored procedure but can the existing filesystem watcher call this
> custom event provider? The number of files to be dropped in the folder is
> very infrequent and I need to send notifications that the data has arrived
> and loaded etc so I thought NS would be good for this.
>
> Any help or reference to where someone else has done this would be greatly
> appreciated.