Checking if a Global Variables already exists 
Author Message
 Checking if a Global Variables already exists

 How do I check if a global variable already exists referencing
its name in a package using VBScript?

SQL Server 7



Tue, 13 Apr 2004 06:05:39 GMT
 Checking if a Global Variables already exists

Set the globalvariable to a default value such as 0 for an int or "default"
for a string. Then in your script write something like

If DTSGlobalVariables("gvsubDir1").Value = 0 Then
    DoThisStep
    DTSTaskExecResult_Failure
Else
    DoOtherStep
    DTSTaskExecResult_Success
End if

This is probably easier than if you were to see if the variable exists.

Jonathan Kind
Fulfillment Systems Engineer
http://www.enews.com



Quote:

>  How do I check if a global variable already exists referencing
> its name in a package using VBScript?

> SQL Server 7



Tue, 13 Apr 2004 06:47:14 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Checking if a #temp1 table exists already

2. how to check if a cursor already exists...

3. Check if cursor already exists.

4. How to check if Temp SP already exist

5. Check if temp. SP already exists

6. How to check if a table already exists

7. How to check if an tempory table already exists

8. check if table already exists??

9. vb: check if table already exists??

10. Check if a file already exists

11. DTS VB custom task reading a global variable and modifying a global variable

12. Checking if Global Temp Table Exists


 
Powered by phpBB® Forum Software