Event-triggered DTS Packages? 
Author Message
 Event-triggered DTS Packages?
Has anyone come across a means of triggering the execution of a DTS package
based on an event (e.g., a file appearing in a particular directory) as
opposed to a set schedule or "monitoring/polling" program running
periodically?

Chris



Mon, 28 Jul 2003 04:02:26 GMT
 Event-triggered DTS Packages?



Quote:
>Has anyone come across a means of triggering the execution of a DTS package
>based on an event (e.g., a file appearing in a particular directory) as
>opposed to a set schedule or "monitoring/polling" program running
>periodically?

>Chris

There are some API calls that can be used to "watch" a directory.

Declare Function FindFirstChangeNotification Lib "kernel32" _
    Alias "FindFirstChangeNotificationA" _
   (ByVal lpPathName As String, _
    ByVal bWatchSubtree As Long, _
    ByVal dwNotifyFilter As Long) As Long

Declare Function FindCloseChangeNotification Lib "kernel32" _
   (ByVal hChangeHandle As Long) As Long

Declare Function FindNextChangeNotification Lib "kernel32" _
   (ByVal hChangeHandle As Long) As Long

Declare Function WaitForSingleObject Lib "kernel32" _
   (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long

I'm sure my sample came from http://www.mvps.org/vbnet/ or
http://www.mvps.org/vb/

It might be better to make the process that creates the file send some
other notification to start the package.

--
Darren Green
SQL/DTS - http://www.swynk.com/friends/green/



Mon, 28 Jul 2003 04:33:20 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. DTS Package Events in C++/ATL

2. DTS Package On Fail Event doesn't work

3. Handling DTS package events

4. Execute a DTS Package in Try...Catch and look for onerror event

5. DTS Package Object and onProgress event

6. Getting events from SQL packages (DTS)

7. DTS Package Events in C#

8. DTS Package OnProgress event

9. Package Events DTS dotnet

10. DTS Package Events in C++/ATL

11. DTS-package doesn't raise OnProgress-event

12. process DTS.Package events from WSH script


 
Powered by phpBB® Forum Software