Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Integration Services
»
How & where do you write to a Variable that...
How & where do you write to a Variable that has scope the entire Package?
Rate Topic
Display Mode
Topic Options
Author
Message
Welsh Corgi
Welsh Corgi
Posted Friday, November 06, 2009 7:18 AM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 10:46 AM
Points: 3,820,
Visits: 4,044
I can create a Global (Package Variable) but how do I write to it using a Script Task or Expressions that have a Global (Package Scope).
My problem is that I a Flat File Connection and I use an expression to create the Connection Name using Variables but I can't reference that Connection Name in the next task Send Mail when I attempt to send the file using an expression.
I need to be able find out how to write to a Package Variable.
I have no issues creating variables that are scope is local (limited) to the specific task.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #814916
Alvin Ramard
Alvin Ramard
Posted Friday, November 06, 2009 7:58 AM
Hall of Fame
Group: General Forum Members
Last Login: Saturday, November 10, 2012 8:24 AM
Points: 3,031,
Visits: 7,383
Should be able to create a variable that has a scope of the whole package making sure that when you create the variable no task or container is selected.
Alvin Ramard
Memphis PASS Chapter
All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.
Post #814938
Welsh Corgi
Welsh Corgi
Posted Friday, November 06, 2009 4:42 PM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 10:46 AM
Points: 3,820,
Visits: 4,044
I need to write to variables that has a scope of the entire package.
If you include the task in a container object then the variables are within the scope of the container.
I made some progress.
The Variable that contains the path & file name did not show anything when I previewed prior to including the task in the container object.
Prior to this change the variable that contained the path & file name when I selected evaluate expression did not display anything.
Now It only shows the Path which is a hard coded variable. It does not show the file prefix, datetimestamp & file prefix, so it bombs out.
I wish that I knew how to write to a package (comporable to a DTS Global Variable).
Thank you,
Kent
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #815257
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.