dbTalk Databases Forums  

Execute DTS Package from .Net - Problems setting global variables

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


Discuss Execute DTS Package from .Net - Problems setting global variables in the microsoft.public.sqlserver.dts forum.



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

Default Execute DTS Package from .Net - Problems setting global variables - 08-24-2005 , 09:20 AM






Hi,
I'm running DTSs from a Windows Service developed with VS2003 (.Net 1.1.).
I need to update some Global Variables values (in the same way I do with
parameter /A of DTSRun.exe).
Those Variables are String Variables. Those variables are used from a
DynamicProperty Task to update the Output file of a Text File Source Task.

So, I loaded the package in a Package2 Object, and try to set the value for
my Global Variables before call Execute.
I got this error:

"The object in GlobalVariable 'MyVariable' could not be persisted. It should
be
dynamically added to and removed from the GlobalVariables collection during
Package execution. No such interface supported"

Any idea to solve this problem?

Thanks a lot

LucasC



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

Default Re: Execute DTS Package from .Net - Problems setting global variables - 08-24-2005 , 01:46 PM






A good place to start is with this article

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


"LucasC" <msdn (AT) rmya (DOT) com.ar> wrote

Quote:
Hi,
I'm running DTSs from a Windows Service developed with VS2003 (.Net 1.1.).
I need to update some Global Variables values (in the same way I do with
parameter /A of DTSRun.exe).
Those Variables are String Variables. Those variables are used from a
DynamicProperty Task to update the Output file of a Text File Source Task.

So, I loaded the package in a Package2 Object, and try to set the value
for
my Global Variables before call Execute.
I got this error:

"The object in GlobalVariable 'MyVariable' could not be persisted. It
should
be
dynamically added to and removed from the GlobalVariables collection
during
Package execution. No such interface supported"

Any idea to solve this problem?

Thanks a lot

LucasC





Reply With Quote
  #3  
Old   
LucasC
 
Posts: n/a

Default Re: Execute DTS Package from .Net - Problems setting global variables - 08-29-2005 , 09:10 AM



Thank you.
Is there any additional solution for the Issue about the String Global
Variables? Is it a problem of .Net or DTSs?
Thanks again

LucasC

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> escribió en el mensaje
news:u%23xBT4NqFHA.4056 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
A good place to start is with this article

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


"LucasC" <msdn (AT) rmya (DOT) com.ar> wrote in message
news:O5o6bdLqFHA.2956 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi,
I'm running DTSs from a Windows Service developed with VS2003 (.Net
1.1.).
I need to update some Global Variables values (in the same way I do with
parameter /A of DTSRun.exe).
Those Variables are String Variables. Those variables are used from a
DynamicProperty Task to update the Output file of a Text File Source
Task.

So, I loaded the package in a Package2 Object, and try to set the value
for
my Global Variables before call Execute.
I got this error:

"The object in GlobalVariable 'MyVariable' could not be persisted. It
should
be
dynamically added to and removed from the GlobalVariables collection
during
Package execution. No such interface supported"

Any idea to solve this problem?

Thanks a lot

LucasC







Reply With Quote
  #4  
Old   
Todd
 
Posts: n/a

Default Re: Execute DTS Package from .Net - Problems setting global variab - 11-14-2005 , 07:13 PM



Allan,

Your post saved me a huge amount of time! I was passing a String
GlobalVariable to DTS from VB.NET and it wasn't working until I changed the
VB.NET to remove/re-add the parameter on the fly. I would still be scratching
my head had I not read your post - thank you!!!

Todd Langdon
tlangdon (AT) yahoo (DOT) com

"Allan Mitchell" wrote:

Quote:
A good place to start is with this article

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


"LucasC" <msdn (AT) rmya (DOT) com.ar> wrote in message
news:O5o6bdLqFHA.2956 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi,
I'm running DTSs from a Windows Service developed with VS2003 (.Net 1.1.).
I need to update some Global Variables values (in the same way I do with
parameter /A of DTSRun.exe).
Those Variables are String Variables. Those variables are used from a
DynamicProperty Task to update the Output file of a Text File Source Task.

So, I loaded the package in a Package2 Object, and try to set the value
for
my Global Variables before call Execute.
I got this error:

"The object in GlobalVariable 'MyVariable' could not be persisted. It
should
be
dynamically added to and removed from the GlobalVariables collection
during
Package execution. No such interface supported"

Any idea to solve this problem?

Thanks a lot

LucasC






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.