Error while writing local log through DTS of SQL Sever

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to write error message into local event log from DTS job of sql
server 2000.I have written the following Active X component.
when I execute this through the job run of SQL Server,I am getting a general
error indicating that execution has failed.
Error description
Error code zero
Error source:Microsoft visual basic runtime error
Error description:Object required:Wscript

Active X component script

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
Main = DTSTaskExecResult_Success
Const EVENT_SUCCESS = 0

Set objShell = Wscript.CreateObject("Wscript.Shell")

objShell.LogEvent EVENT_SUCCESS, _
"this application successfully installed."

End Function
 
I'd change;
Set objShell = Wscript.CreateObject("Wscript.Shell")
to
Set objShell = CreateObject("Wscript.Shell")

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hi,
|
| I am trying to write error message into local event log from DTS job of
sql
| server 2000.I have written the following Active X component.
| when I execute this through the job run of SQL Server,I am getting a
general
| error indicating that execution has failed.
| Error description
| Error code zero
| Error source:Microsoft visual basic runtime error
| Error description:Object required:Wscript
|
| Active X component script
|
| '**********************************************************************
| ' Visual Basic ActiveX Script
| '************************************************************************
|
| Function Main()
| Main = DTSTaskExecResult_Success
| Const EVENT_SUCCESS = 0
|
| Set objShell = Wscript.CreateObject("Wscript.Shell")
|
| objShell.LogEvent EVENT_SUCCESS, _
| "this application successfully installed."
|
| End Function
 
Back
Top