DaBoo_
01-14-2004, 05:55 AM
Hi!
I have program my first DTS Package for the Microsoft SQL Server 7.0.
With the fallowing rows i am going to send an email over CDONTS.
Sub SendMail(sFromAddress, sToAddress, sSubject, sBody)
Dim objMail, errCode
'Create the mail object
Set objMail = CreateObject("CDONTS.NewMail")
'Set all the properties for this email
objMail.From = sFromAddress
objMail.To = sToAddress
objMail.Subject = sSubject
objMail.Body = sBody
objMail.Send
'Clean up
Set objMail = nothing
End Sub
But if the DTS runs, the fallowing error occurs:
Error Code: 0
ErrorSource=Microsoft VBScript runtime error
Error Description: ActiveX component can't create object
Error on Line 77
The Code in Line 77 is "objMail.Send". If i take it out, the DTS runs without any problem! I tried to code the mail properties hard ("objMail.From = "xxx@xxx.com") but it do not works too.
Somebody could help me??!
Thanks a lot! Greetings, DaBoo_
I have program my first DTS Package for the Microsoft SQL Server 7.0.
With the fallowing rows i am going to send an email over CDONTS.
Sub SendMail(sFromAddress, sToAddress, sSubject, sBody)
Dim objMail, errCode
'Create the mail object
Set objMail = CreateObject("CDONTS.NewMail")
'Set all the properties for this email
objMail.From = sFromAddress
objMail.To = sToAddress
objMail.Subject = sSubject
objMail.Body = sBody
objMail.Send
'Clean up
Set objMail = nothing
End Sub
But if the DTS runs, the fallowing error occurs:
Error Code: 0
ErrorSource=Microsoft VBScript runtime error
Error Description: ActiveX component can't create object
Error on Line 77
The Code in Line 77 is "objMail.Send". If i take it out, the DTS runs without any problem! I tried to code the mail properties hard ("objMail.From = "xxx@xxx.com") but it do not works too.
Somebody could help me??!
Thanks a lot! Greetings, DaBoo_