July 30, 2008 at 1:58 pm
I have an activex script task that calls a function from a dll.
Here is an example
Option Explicit
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim oBCD
Dim oFileLog
Dim oFileSys
Main = DTSTaskExecResult_Failure
Set oFileSys = CreateObject("Scripting.FileSystemObject")
'create log file
Set oFileLog = oFileSys.CreateTextFile("D:\FeeScheduleLogTest.txt", True)
Set oBCD = CreateObject("BCDConversion.BCDConversion")
oFileLog.WriteLine oBCD.BCDtoFloat(63, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0) *
Set oBCD = Nothing
oFileLog.Close
'Destroy the objects
Set oFileLog = Nothing
Set oFileSys = Nothing
Main = DTSTaskExecResult_Success
End Function
When I right click on the task inside the package it runs fine. When I schedule the package it fails giving me an error "Object Required" on the line which actually calls the function.(Marked with a star)
I can't figure out why it does this. Any advice would be helpful.
August 1, 2008 at 3:46 am
Hi,
I've had similar problems in the past, in my case it was due to the network drive not being available on runtime. I solved it by replacing it with the unc-path (\\ComputerName\SharedFolder\Resource) form.
hope it helps
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply