Dynamically changing SourceObjectName -
07-21-2003
, 10:10 AM
Having a DTS package with an ActiveX Script task that dynamically
changes the source of a Transform Data Task which uses a 'Microsoft
FoxPro VFP Driver (*.dbf)' connection, works only almost as expected.
The ActiveX script goes like this:
------------------------------------------
Dim oPKG
Set oPKG = DTSGlobalVariables.Parent
Set oDataPump = oPKG.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask
oDataPump.SourceObjectName = "`" &
DTSGlobalVariables("sourceCatalog").Value & "`\`V" &
DTSGlobalVariables("jobID").Value & "`"
-----------------------------------------------
What happens is that when this ActiveX script is executed, the
Transform Data Task fails with an 'HResult of 0x80040e37' error, which
means that the specified table does not exist.
BUT...If I manually inspect the Transform Data Task and clicks OK, the
source table/view changes from e.g. `c:\sourceCatalog`\`12345` to just
12345, and the task executes with success.
So my question is: What happens to the source table/view when OK is
clicked, and can I achieve the similar from my ActiveX script task?
--
Morten |