Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Reacting to new file

Author  Topic 

NickyJ
Starting Member

46 Posts

Posted - 2005-11-14 : 11:18:06
I currently have a DTS job which is scheduled to run every 30 minutes, it checks to see if a file exists within a directory and then imports this XML file into a SQL table. Now what I'd like to know is, is there a way that when the source file is created and saved to the network is it possible to trigger the task then, as if the network directory changes then do something ?? This would mean there's no time elapse.
Thanks all...

SqlStar
Posting Yak Master

121 Posts

Posted - 2005-11-14 : 19:41:46
Hi,

Its possible. We did like that in my one of project. You have to create a windows scheduler. This windows schduler will watch always the specific directory path for specified frequency/interval. If any/specific file is added into that directory, it will start the process to run the DTS package.

For this, you can use "dtsrun" command line utility. We used C# for developing the watcher control. I am not sure about your technology, Also its possible with VB6.

Try with this....

Rafiq
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"You have to dream before your dreams can come true" -- President Of India
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2005-11-14 : 19:43:35
Do some searching on Wait for Single Object (WaitForSingleObject()) in the language of your choice. It's a Windows API call.

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>
Go to Top of Page
   

- Advertisement -