gtetran
asked on
ActiveX in SQL Server Enterprise Manager / DTS package
Hi Expert,
I created an ActiveX and that will be placed in a DTS package. However, when I execute the activeX step, it errors out and give me an error message saying: "Microsoft Data Transformation Services (DTS) Package Task 'Trnasform data Task: Rsult' was not fould"
Below is the activeX script. Thank you for your help.
Paul, CA, USA
__________________________ _____
'************************* ********** ********** ********** ********** *****
' Visual Basic ActiveX Script
'************************* ********** ********** ********** ********** *******
Function Main()
' Declare result strings to assign to globals .
Dim strResultSQL
Dim strStartDate, strEndDate
' Declare package object
Dim oPackage
' Build up the Date ranges required
strStartDate = "'" & DTSGlobalVariables("LoadSt artDate"). Value & "'"
strEndDate = "'" & DTSGlobalVariables("LoadEn dDate").Va lue & "'"
' Declare select statements.
Dim strSQL_RESULT_SELECT
strSQL_RESULTS_SELECT = "SELECT * FROM RESULT DATE_TIME>= " & strStartDate & " AND DATE_TIME<= " & strEndDate & " "
' Construct full SQL statements
strResultSQL = strSQL_RESULT_SELECT
' Assign constructed SQL String to pump objects.
SET oPackage = DTSGlobalVariables.Parent
SET oPump = oPackage.Tasks("Transform Data Task: Result").CustomTask
oPump.SourceSQLStatement = strResultSQL
SET oPackage = Nothing
Main = DTSTaskExecResult_Success
End Function
__________________________ _____
I created an ActiveX and that will be placed in a DTS package. However, when I execute the activeX step, it errors out and give me an error message saying: "Microsoft Data Transformation Services (DTS) Package Task 'Trnasform data Task: Rsult' was not fould"
Below is the activeX script. Thank you for your help.
Paul, CA, USA
__________________________
'*************************
' Visual Basic ActiveX Script
'*************************
Function Main()
' Declare result strings to assign to globals .
Dim strResultSQL
Dim strStartDate, strEndDate
' Declare package object
Dim oPackage
' Build up the Date ranges required
strStartDate = "'" & DTSGlobalVariables("LoadSt
strEndDate = "'" & DTSGlobalVariables("LoadEn
' Declare select statements.
Dim strSQL_RESULT_SELECT
strSQL_RESULTS_SELECT = "SELECT * FROM RESULT DATE_TIME>= " & strStartDate & " AND DATE_TIME<= " & strEndDate & " "
' Construct full SQL statements
strResultSQL = strSQL_RESULT_SELECT
' Assign constructed SQL String to pump objects.
SET oPackage = DTSGlobalVariables.Parent
SET oPump = oPackage.Tasks("Transform Data Task: Result").CustomTask
oPump.SourceSQLStatement = strResultSQL
SET oPackage = Nothing
Main = DTSTaskExecResult_Success
End Function
__________________________
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.