Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2004, 01:52 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Execute Package

Can anyone offer a code snippet that will allow me from a Child DTS Package, modify settings on the Parent DTS package.

Example:
DTSPack1 calls DTSPack2. Within DTSPack2 some of the connection settings inside DTSPack1 are changed. When DTSPack2 returns to DTSPack1 the adjusted settings would be executed.

Below is a code snipped that changes a connection setting within the parent package - but I want to execute this from a child package. So the first line that refers to Set oPkg = DTSGlobalVariables.Parent I would think needs to be changed to refer to the parent DTS package - but I can't figure it out:

    ' Get reference to current package
    Set oPkg = DTSGlobalVariables.Parent
    ' Get Tasks collection
    Set oTask = oPkg.Tasks

    'Set up Connection
    Set oConn = oPkg.Connections("PAC")
    oConn.DataSource = oRS.Fields("SrcDSNName")
    oConn.Password = oRS.Fields("SrcDSNPass")
    oConn.UserID = oRS.Fields("SrcDSNUser")

_________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200
__________________
_________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200




Similar Threads
Thread Thread Starter Forum Replies Last Post
Deployment - Execute Package task carumuga SQL Server DTS 0 October 3rd, 2008 07:43 AM
Execute SSIS Package from ASP.NET ghari ASP.NET 1.0 and 1.1 Professional 0 June 11th, 2007 12:51 AM
Execute Package Error dgosche BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 2 February 13th, 2006 12:14 PM
execute a package from ASP mdianep2p SQL Server DTS 2 July 19th, 2004 04:54 PM
Execute Package hortoristic SQL Server DTS 0 January 12th, 2004 01:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.