dbTalk Databases Forums  

Re: Changing Global Variable valuses from within VBScript

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


Discuss Re: Changing Global Variable valuses from within VBScript in the microsoft.public.sqlserver.dts forum.



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

Default Re: Changing Global Variable valuses from within VBScript - 04-04-2004 , 07:49 AM






In the Accelerator an SQL-table is used to store these variables .. is this
because of the number of variables ? When direct coding is possible ?

Perhaps its because of the complexity in the packages where the variables
can be used by several packages ..

<g> wrote

Quote:
Great thanks.
"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:uBNi3CZFEHA.2944 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
It is possible

Here is an example

Function Main()

dim origVal, newVal

origVal = DTSGlobalVariables("MyVariable").Value

msgbox origVal

'Change

DTSGlobalVariables("MyVariable").Value = "Now I have changed"

newVal = DTSGlobalVariables("MyVariable").Value

msgbox newVal


Main = DTSTaskExecResult_Success
End Function

--

----------------------------

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


g> wrote

Is it possible to chage global variable values using VBScript, if so
how?










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.