none
ActiveX Scripting encountered a Run Time Error during the execution of the script. RRS feed

  • Question

  • It just stopped running with no changes to the server.

    Any help will be welcomed.

     

    Message

    Executed as user: IGSLAN\svc-finsql. DTSRun:  Loading...   DTSRun:  Executing...   DTSRun OnStart:  DTSStep_DTSActiveScriptTask_1   DTSRun OnError:  DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE)      Error string:  ActiveX Scripting encountered a Run Time Error during the execution of the script.      Error source:  Microsoft Data Transformation Services (DTS) Package      Help file:  sqldts80.hlp      Help context:  4500      Error Detail Records:      Error:  -2147220482 (800403FE); Provider Error:  0 (0)      Error string:  ActiveX Scripting encountered a Run Time Error during the execution of the script.      Error source:  Microsoft Data Transformation Services (DTS) Package      Help file:  sqldts80.hlp      Help context:  4500      DTSRun OnFinish:  DTSStep_DTSActiveScriptTask_1   DTSRun:  Package execution complete.  Process Exit Code 1.  The step failed.

     

    A DTS package

     

    TYPE = ActiveX Script Task: undefined

     

    Package

     

    'Simple Mail Transfer Protocol (SMTP) Server Name

    Const SMTP_SERVER = "smtp.intergraph.com"

    Dim TheMsg

    TheMsg="The attached orders and/or contracts have been received by IGS Contracts and have been reviewed to confirm that, in accordance with procedures, "

    TheMsg=TheMsg & "persuasive evidence of a contractual arrangement exists between Intergraph Government Solutions and the customer. Copies of orders will be saved "

    TheMsg=TheMsg & "to \\coral\IGSC-BusOps\COTS. Contracts are named by COTS ID log number. "

    TheMsg=TheMsg & "<br><br>This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is "

    TheMsg=TheMsg & "If you are not the intended recipient of this message, you are not authorized to "

    TheMsg=TheMsg & "read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify "

    TheMsg=TheMsg & "immediately by return e-mail and delete it from your computer. "

     

     

    'ADO Connection String to database.  

    Function Main()

     

    Dim iMsg

     Dim iConf

     Dim Flds

     

    'We will use CDO Send Using Pickup in this example

    Const cdoSendUsingPickup = 1

    Const cdoSendUsingPort = 2

     

    'Use COM to create Message and Configuration Objects

    set iMsg = CreateObject("CDO.Message")

    set iConf = CreateObject("CDO.Configuration")

     

    'Now Set the field to the configuration objects fields

    Set Flds = iConf.Fields

     

    'Set the field namespaces to the relevant variables/constants

    With Flds

         .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort

         .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTP_SERVER

         .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 

         .Update

    End With

     

    ' Apply the settings to the message.

    With iMsg

         Set .Configuration = iConf

         .To = "IGSCCOTSDailyOrdersNotification@hq.pcmail.ingr.com"

         .CC = "rick.george@intergraph.com; hugh.luna@intergraph.com"

         .From =  "sqladmin@ingr.com"

         .Subject = "Contracts order tracking – new orders"

         .HTMLBody=TheMsg

          .AddAttachment "\\gs205.igslan.com\cots\Data\order_distribution.xls"

         .Send 'Finally Send the message

    End With

     

    ' Clean up variables.

    Set iMsg = Nothing

    Set iConf = Nothing

    Set Flds = Nothing

     

         Main = DTSTaskExecResult_Success

     

    End Function

     

     

    Tuesday, December 28, 2010 2:20 PM

All replies

  • Did any settings change on your mail server?  Password change or orhter changes? Is there a problem accessing the order_distribution.xls file using the credentials of the job?
    Russel Loski, MCT
    Tuesday, December 28, 2010 3:46 PM
  • Hi RGL123,

    Could you please try to run the script in a VBS script file on the same server, and check if it works? If the VBS script won't work, the issue might be caused by the COM object error or the mail server server. Then, please view the System Logs to verity the issue.

    Thanks,
    Jin Chen

     


    Jin Chen - MSFT
    Wednesday, December 29, 2010 6:25 AM
    Moderator