I am a DBA. We have migrated SQL 2000 databases + DTS packages to SQL 2008. One of the DTS packages runs an ActiveX script to open an Excel file (which has runs macros when you open it). Coding inside the ActiveX script is:
Function Main()
Set XlApp = CreateObject("Excel.Application")
call XlApp.Workbooks.Open("\\server\c$\path.xls",3)
call XlApp.Workbooks.Open("\\server\c$\path2.xls",3)
call XlApp.Workbooks.Open("\\server\c$\path3.xls",3)
set XlApp = nothing
Main = DTSTaskExecResult_Success
End Function
Sometimes it throws "Active X component has experienced a run time error" without even telling the details about the error and sometimes it runs fine. The DTS package is run using a SQL agent job. Is there a better and reliable way to do this without using the ActiveX script?
Thanks!
