dbTalk Databases Forums  

Dynamically changing SourceObjectName

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Dynamically changing SourceObjectName in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Morten
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.