Sql server ActiveX脚本在脚本执行过程中遇到运行时错误

Sql server ActiveX脚本在脚本执行过程中遇到运行时错误,sql-server,Sql Server,我在我的dts包中使用ActiveX脚本任务,这已经运行多年了。但是,一周后,我在调用send函数之前收到以下消息: ActiveX脚本在执行过程中遇到运行时错误 剧本 服务器:SQL Server 2000 SP4 代码是: Function Main() SendEmail() Main = DTSTaskExecResult_Success End Function Function SendEmail() Dim dt dt = Date di

我在我的dts包中使用ActiveX脚本任务,这已经运行多年了。但是,一周后,我在调用send函数之前收到以下消息:

ActiveX脚本在执行过程中遇到运行时错误 剧本

服务器:SQL Server 2000 SP4

代码是:

Function Main()
    SendEmail()
    Main = DTSTaskExecResult_Success
End Function

Function SendEmail()
    Dim dt 
    dt = Date
    dim CurrentDate 
    CurrentDate = Month(dt) & "/" & Day( dt ) & "/" & Year(dt)

    Set objMessage = CreateObject("CDO.Message") 
    objMessage.Subject = CurrentDate
    objMessage.From = "xx@xx.net" 
    objMessage.To = "xx@xx.net"  
    objMessage.HTMLBody  = CurrentDate

    '==This section provides the configuration information for the remote SMTP server.
    '==Normally you will only change the server name or IP.
    objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 

    'Type of authentication, NONE, Basic (Base64 encoded), NTLM
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

    'Use SSL for the connection (False or True)
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

    'Name or IP of Remote SMTP Server
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xx.xx.net"

    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xx"

    'Your password on the SMTP server
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xx"

    'Server port (typically 25)
    objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 

    objMessage.Configuration.Fields.Update

    objMessage.Send
End Function 

如果您发布代码、XML或数据示例,请在文本编辑器中突出显示这些行,并单击编辑器工具栏上的“代码示例”按钮(
{}
),以很好地格式化和语法突出显示它!一周前发生了什么变化?服务器上是否安装了修补程序或新软件?系统或程序包日志中是否存在任何错误?是否有任何帐户权限更改?