dbTalk Databases Forums  

Updating global variables

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


Discuss Updating global variables in the microsoft.public.sqlserver.dts forum.



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

Default Updating global variables - 09-06-2005 , 04:41 AM






Hi!

I created a DTS package which has an ActiveX Script Task as one of its
elements. Below is some part of it

strNumer = DTSGlobalVariables("NumerPliku").Value
DTSGlobalVariables("NumerPliku").Value = strNumer + 1

When I run this package withing DTS Designer global variable is updated. But
when I run it via schedule or by manully executing it from EM it does not
work
How to fix it?

Regards
Silmar



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Updating global variables - 09-06-2005 , 12:18 PM






Unless you get an error I'd say the script is running fine. The most likely
cause is you are referencing two variables in different places. Variable
names are case sensitive. First thing to try is turn in the Explicit option
for global variables, see Package properties.

Variables are implicitly created if they do not exist already.

Another useful test is to log all you global variables, at run-time, to an
external location an view them afterwards.

Global variable diagnostic script
(http://www.sqldts.com/default.aspx?303)


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com


"Silmar" <silmar (AT) talex (DOT) pl> wrote

Quote:
Hi!

I created a DTS package which has an ActiveX Script Task as one of its
elements. Below is some part of it

strNumer = DTSGlobalVariables("NumerPliku").Value
DTSGlobalVariables("NumerPliku").Value = strNumer + 1

When I run this package withing DTS Designer global variable is updated.
But when I run it via schedule or by manully executing it from EM it does
not work
How to fix it?

Regards
Silmar





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.