dbTalk Databases Forums  

Global Variable creation

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


Discuss Global Variable creation in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Robert Richards via SQLMonster.com
 
Posts: n/a

Default Global Variable creation - 01-19-2005 , 12:50 PM






I am creating a DTS package to archive records from one table to another, given a certain lower and upper row count.

These lower and upper values need to be dynamic, and if possible used as global variables.

In essence, in VBScript I would like to have the individual executing the package to be asked if the current lower and upper global variables are acceptable, if not then be able to modify their values.

I currently have some global variables created in Execute SQL Task steps. I can see and use them, but how do I create global variables that are independent of a SQL Task?

--
Message posted via http://www.sqlmonster.com

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

Default Re: Global Variable creation - 01-19-2005 , 02:28 PM






Global Variables are not aligned to a Task they are at the package level.

In your package you can then use them in a task if you so wish.

It is generally considered bad practice to ask a user for something in the
middle of a package. This invites the "Lunchtime Lock". I personally would
grab the variable values up front in a client app. Ask the user. Change if
necesary. I do not know how you calll the package but there are numerois
ways to pass the new values.

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Robert Richards via SQLMonster.com" <forum (AT) SQLMonster (DOT) com> wrote

Quote:
I am creating a DTS package to archive records from one table to another,
given a certain lower and upper row count.

These lower and upper values need to be dynamic, and if possible used as
global variables.

In essence, in VBScript I would like to have the individual executing the
package to be asked if the current lower and upper global variables are
acceptable, if not then be able to modify their values.

I currently have some global variables created in Execute SQL Task steps.
I can see and use them, but how do I create global variables that are
independent of a SQL Task?

--
Message posted via http://www.sqlmonster.com



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.