Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
zsmulder
Starting Member
1 Post |
Posted - 2006-01-16 : 07:14:41
|
hi got a pb calling a task from another in a dts package in vbscript with an activex script. i need to send emails from a db using one sendmailtask. i am able to get the task id, update its values, but i can't make it execute. i use the objecT.excute method, but i can't make it work, i don't know how to instantiate the parameters variables it need. anyone know? my lines code: function sendMail2 (mailTo, mailCC, mailSubject, mailBody, mailFiles) Dim oPkg, oTasks, oSendMailTask sendMail2 = DTSTaskExecResult_Success Set oPkg = DTSGlobalVariables.Parent Set oTasks = oPkg.Tasks Set oSendMailTask = oTasks("DTSTask_DTSSendMailTask_2").CustomTask if oSendMailTask is nothing then sendMail2 = DTSTaskExecResult_Failure exit Function end if oSendMailTask.Subject = oPkg.Name oSendMailTask.PROFILE = DTSGlobalVariables("MAIL_PROFILE").Value oSendMailTask.PASSWORD = DTSGlobalVariables("MAIL_PASSWORD").Value oSendMailTask.DESCRIPTION = DTSGlobalVariables("MAIL_DESCRIPTION").Value oSendMailTask.TOLINE = mailTo oSendMailTask.CCLINE = mailCC oSendMailTask.FILEATTACHMENTS = mailFiles oSendMailTask.SUBJECT = mailSubject oSendMailTask.MESSAGETEXT = mailBody oSendMailTask.FileAttachments = mailFiles 'oSendMailTask.Execute oPkg, null , null , 2 Set oSendMailTask = Nothing Set oTasks = Nothing Set oPkg = Nothing end function |
|
anagha
Starting Member
4 Posts |
Posted - 2006-03-03 : 06:02:00
|
Well..to add to this...even am tryin to run an active script task from another active script task in a package...objTask.Execute is not workin..:(Post the solution if u`ve found out.. |
 |
|
|
|
|
|
|