dbTalk Databases Forums  

Using ActiveX script in DTS, how to post an event in windows event log

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Using ActiveX script in DTS, how to post an event in windows event log in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
guru
 
Posts: n/a

Default Using ActiveX script in DTS, how to post an event in windows event log - 05-21-2004 , 04:01 PM






We can configure DTS package to log an event in the event log if the DTS package fails or executes successfully. This works and i have tested this

In DTS, is there a way to use activex script and access EventLog

Thanks in advanc


Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Using ActiveX script in DTS, how to post an event in windows event log - 05-24-2004 , 08:37 AM






You can use the WSH Shell object to log an event from within an ActiveX
Script Task-

Set oWSH = CreateObject("WScript.Shell")
oWSH.LogEvent 0, "My Message"
Set oWSH = Nothing

WshShell Object
(http://msdn.microsoft.com/library/de...-us/script56/h
tml/wsobjwshshell.asp)

--
Darren Green
http://www.sqldts.com

"guru" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
We can configure DTS package to log an event in the event log if the DTS
package fails or executes successfully. This works and i have tested this.

In DTS, is there a way to use activex script and access EventLog?


Thanks in advance




Reply With Quote
  #3  
Old   
guru
 
Posts: n/a

Default Re: Using ActiveX script in DTS, how to post an event in windows event log - 05-26-2004 , 09:46 PM



Thanks for the help.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.