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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 ActiveX Script -- CREATE OBJECT error

Author  Topic 

thanksfor help
Posting Yak Master

106 Posts

Posted - 2007-07-27 : 18:57:48
Hi,

The following ActiveX script work fine in the DTS package.

OPTION EXPLICIT
Function Main()

'References to Excel
dim xl_app
dim objXLSWorkbook


SET xl_app =CREATEOBJECT("Excel.Application")
'xl_app.Visible = True
Set objXLSWorkbook =xl_app.Workbooks.Open("D:\FileName07.xls")

'Run the macro
xl_app.Run DTSGlobalVariables("Macro_name").Value
objXLSWorkbook.Save
objXLSWorkbook.Close
xl_app.Quit
set xl_app = Nothing
Main = DTSTaskExecResult_Success
End Function

But when I schedule the package, it gives error below.The user login have system admin, server role.

Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Permission denied: 'CREATEOBJECT'

Error on Line 11

Step Error code: 800403FE
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:4500

Any help is appreciated.


   

- Advertisement -