all groups > sql server dts > august 2003 >
You're in the

sql server dts

group:

VBScript Across DTS jobs


VBScript Across DTS jobs Bryan O'Malley
8/28/2003 8:17:31 PM
sql server dts:
Hi All,

Is it possible for an ActiveX task (VBScript) in one DTS job to change
something in another DTS Job?

I would like to be able to have one DTS job that creates a new Access
Database. It would then change the Connection information in the 2nd Job to
it points to the new Access Job, then it would call the 2nd Job. Is this
possible?

I know you can do something like this all in the same job (Create the
DB, set the connection, run), but can it be done across jobs? If so, how do
you reference the connection in the 2nd job?

Thanks!

Bryan

VBScript Across DTS jobs Ravi
8/28/2003 11:30:18 PM
Hi,
I think you can try out using some thing Global Variables
and Dynamic Properties Task
I havent tested it I am just thinking Loud...

1)Create Global Variables Gv_NewConnection
2)Assign the name of new database to the the global
variable
3)Set your connection using Dyanmic Properties Task
For the connection use the Global Variable as parameter
Re: VBScript Across DTS jobs Allan Mitchell
8/29/2003 6:44:56 AM
When you say job do you mean job or package ?

In 2000 you can use the ExecutePackage task to pass things into child
packages
You can execute the Child package using VBscript in an Active Script task
and pass in information

Execute a package from a package
(http://www.sqldts.com/default.aspx?215)

You can store information in a Table (Set and retrieve) then use ADO or an
ExecuteSQL task to retrieve os set.

Lots of options.

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
AddThis Social Bookmark Button