dbTalk Databases Forums  

LoadFromSqlServer problem...

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


Discuss LoadFromSqlServer problem... in the microsoft.public.sqlserver.dts forum.



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

Default LoadFromSqlServer problem... - 02-23-2005 , 05:51 AM






hi,
By following the kb
http://support.microsoft.com/default...b;en-us;321525
If I don't set any globalVariable , then LoadFromSqlSever and execute
method is fine.
AfterI add some scripts to set a gloablevariable value , I get errorcode
= - 2147220482 on the setp the variable first used.
Dim objGlobal1 As DTS.GlobalVariable2
For Each objGlobal1 In pkg.GlobalVariables
If objGlobal1.Name = "gsYM" Then
objGlobal1.Value = "'200502'"
End If
...........
Next

Any help is appreciated.




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

Default Re: LoadFromSqlServer problem... - 02-23-2005 , 09:53 AM






It maybe this issue-

"In order to change the value of a DTS Global Variable of type String from
VB.Net code, the variable must be programmatically removed from the
collection and added back with its new value."

DTS Global Variables and Visual Basic .Net
(http://www.sqldts.com/default.aspx?265)



"steffi" <steffibev (AT) hotmail (DOT) com> wrote

Quote:
hi,
By following the kb
http://support.microsoft.com/default...b;en-us;321525
If I don't set any globalVariable , then LoadFromSqlSever and execute
method is fine.
AfterI add some scripts to set a gloablevariable value , I get errorcode
= - 2147220482 on the setp the variable first used.
Dim objGlobal1 As DTS.GlobalVariable2
For Each objGlobal1 In pkg.GlobalVariables
If objGlobal1.Name = "gsYM" Then
objGlobal1.Value = "'200502'"
End If
...........
Next

Any help is appreciated.






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.