I'm connecting to SQL 2005 through 2000 Enterprise Manager to create a DTS package to send multiple files as an attachment in one email. The following script worked in SQL 2000. However, I got an error message when connecting to SQL 2005:
Error Source: Microsoft Data Transformation Services(DTS) Package
Error Discription: Error Code 0
Error Source: Microsoft VBScript compilation error
Error Description: Syntax erorr
Error on Line 11
do i need to install any specific component on SQL 2005 in order for this script to work. Your help/suggestion is greatly appreciated.
Thanks
Option Explicit
'**********************************************************
' Visual Basic ActiveX Script
'**********************************************************
Function Main()
Dim objNewMail
Set objNewMail = CreateObject("CDONTS.NewMail")
Call
objNewMail.AttachFile("C:\FileSend\Order Summary.xls", "Order Detail.xls", "Order Statistics.xls", "Order Quarterly 102907.pdf")
objNewMail.Send "jsmith@juno.com",
"dschumaker@yahoo.com;bryan@hotmail.com",
"Daily Report", " Attached is the daily report files."
Set objNewMail = Nothing
Main = DTSTaskExecResult_Success
End Function
Error Source: Microsoft Data Transformation Services(DTS) Package
Error Discription: Error Code 0
Error Source: Microsoft VBScript compilation error
Error Description: Syntax erorr
Error on Line 11
do i need to install any specific component on SQL 2005 in order for this script to work. Your help/suggestion is greatly appreciated.
Thanks
Option Explicit
'**********************************************************
' Visual Basic ActiveX Script
'**********************************************************
Function Main()
Dim objNewMail
Set objNewMail = CreateObject("CDONTS.NewMail")
Call
objNewMail.AttachFile("C:\FileSend\Order Summary.xls", "Order Detail.xls", "Order Statistics.xls", "Order Quarterly 102907.pdf")
objNewMail.Send "jsmith@juno.com",
"dschumaker@yahoo.com;bryan@hotmail.com",
"Daily Report", " Attached is the daily report files."
Set objNewMail = Nothing
Main = DTSTaskExecResult_Success
End Function