Error while writing local log through DTS of SQL Sever

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
 
D

Dave Patrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top