
DTS: ActiveX Script task error when using with Analysis Processing Task
I am trying to automate the task of Processing Analysis Services Cubes.
I need to incrementally process my Cubes. Hence I created a package
with a ActiveX script task and a Analysis Processing Task.
I tried using ActiveX script task to change the properties of a Analysis
Processing Task.
My ActiveX script is like this
Function Main()
Dim pkg
Dim task
Dim props
Dim RecentYear
Dim RecentMonth
'I be calculating these two variables. For now I have hardcoded them
RecentYear = 2003
RecentMonth = '05'
Set pkg = DTSGlobalVariables.parent
Set task = pkg.Tasks("DTSTask_DTSOlapProcess.Task_1")
Set props = task.Properties
props("Filter").Value = "Testing .... " & RecentYear and &
RecentMonth
Main = DTSTaskExecResult_Success
End Function
The ActiveX step works fine when I use "Execute Step", but when I use
"Execute Package" - the step fails and giving the following error
" Need to run the object to perform the operation
Code Execution Exception: Exception_Access_Violation "
With some debugging, the could guess that the error is occuring at
Set task = pkg.Tasks("DTSTask_DTSOlapProcess.Task_1")
I even tried using the example given in BOL. The same error occurs.
Anyone know how to avoid it.
Any other approach for my automation will also be helpful.
--
Posted via http://www.***.com/