dbTalk Databases Forums  

Calling a DTS pkg from a DTS pkg

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


Discuss Calling a DTS pkg from a DTS pkg in the microsoft.public.sqlserver.dts forum.



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

Default Calling a DTS pkg from a DTS pkg - 12-17-2003 , 11:01 PM






Each time I try to call another pkg the process fails.
I am using the following logic to call the next pkg.


' ============= Call another DTS pkg ==============
const DTSSQLStgFlag_UseTrustedConnection = 256

' == Call the pkg which will read each file and process it.
Set oPkg = CreateObject( "DTS.Package")
oPkg.LoadFromSQLServer
"PII350","","",DTSSQLStgFlag_UseTrustedConnection, "","","","IN_UPDATE_DAILYD
ATA_INPUT_FILES_tblRawDataTempHold"


Everything works fine until I add the line:


oPkg.LoadFromSQLServer
"PII350","","",DTSSQLStgFlag_UseTrustedConnection, "","","","IN_UPDATE_DAILYD
ATA_INPUT_FILES_tblRawDataTempHold"

Then the ActiveX script fails. What I am doing wrong? I've looked at the
LoadFromSQLServer line over and over and I cannot see any syntax errors.
Any ideas on how to troubleshoot this?




Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Calling a DTS pkg from a DTS pkg - 12-18-2003 , 02:38 AM






Change it to

oPkg.LoadFromSQLServer

"PII350",,,DTSSQLStgFlag_UseTrustedConnection,,,," IN_UPDATE_DAILYDATA_INPUT_
FILES_tblRawDataTempHold"



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Donald Pickering" <donpick1 (AT) hotmail (DOT) com> wrote

Quote:
Each time I try to call another pkg the process fails.
I am using the following logic to call the next pkg.


' ============= Call another DTS pkg ==============
const DTSSQLStgFlag_UseTrustedConnection = 256

' == Call the pkg which will read each file and process it.
Set oPkg = CreateObject( "DTS.Package")
oPkg.LoadFromSQLServer

"PII350","","",DTSSQLStgFlag_UseTrustedConnection, "","","","IN_UPDATE_DAILYD
ATA_INPUT_FILES_tblRawDataTempHold"


Everything works fine until I add the line:


oPkg.LoadFromSQLServer

"PII350","","",DTSSQLStgFlag_UseTrustedConnection, "","","","IN_UPDATE_DAILYD
ATA_INPUT_FILES_tblRawDataTempHold"

Then the ActiveX script fails. What I am doing wrong? I've looked at the
LoadFromSQLServer line over and over and I cannot see any syntax errors.
Any ideas on how to troubleshoot this?






Reply With Quote
  #3  
Old   
Donald Pickering
 
Posts: n/a

Default Re: Calling a DTS pkg from a DTS pkg - 12-18-2003 , 02:24 PM



Thank you for your help.
I finally solved my problem. I had Option Explicit set and I didn't have a
variable dimensioned. I expected ActiveX to tell me if a variable wasn't
dim'd . Apparently it doesn't do that; it just fails.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Change it to

oPkg.LoadFromSQLServer


"PII350",,,DTSSQLStgFlag_UseTrustedConnection,,,," IN_UPDATE_DAILYDATA_INPUT_
FILES_tblRawDataTempHold"



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Donald Pickering" <donpick1 (AT) hotmail (DOT) com> wrote in message
news:vu2d9hbr28nr0f (AT) corp (DOT) supernews.com...
Each time I try to call another pkg the process fails.
I am using the following logic to call the next pkg.


' ============= Call another DTS pkg ==============
const DTSSQLStgFlag_UseTrustedConnection = 256

' == Call the pkg which will read each file and process it.
Set oPkg = CreateObject( "DTS.Package")
oPkg.LoadFromSQLServer


"PII350","","",DTSSQLStgFlag_UseTrustedConnection, "","","","IN_UPDATE_DAILYD
ATA_INPUT_FILES_tblRawDataTempHold"


Everything works fine until I add the line:


oPkg.LoadFromSQLServer


"PII350","","",DTSSQLStgFlag_UseTrustedConnection, "","","","IN_UPDATE_DAILYD
ATA_INPUT_FILES_tblRawDataTempHold"

Then the ActiveX script fails. What I am doing wrong? I've looked at
the
LoadFromSQLServer line over and over and I cannot see any syntax errors.
Any ideas on how to troubleshoot this?








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.