Discussion:
dtsx - how to store connection password in variable
(too old to reply)
Screaming Eagles 101
2009-08-13 12:55:48 UTC
Permalink
Hi,

I'd like to store the connection password in a variable (DB2 connection)
and then use the variable for the connection in a VS2005 - SQL Server 2005
dtsx project.
Making a package variable is ok, but what about the next step ? How do I use
the variable ?
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------
Todd C
2009-08-14 12:51:02 UTC
Permalink
Hello Filip:

Yes, it can be done, and I'll explain how to do it, but please do yourself a
favor and consider using Package Configurations. Check out my blog on the
subject:
http://toddchitt.wordpress.com/
(Yes, it's shameless self-promotion, but I posted it just so I would not
have to repeat it in forums like this!)

OK, Here is how you use a variable that contains a password:
Click on the Connection Manager in question. In the Properties pane, find
the Expressions section and create an Expression for the Connection String.
Set it to:
"Provider = blah, blah, blah;userid=blah;Password=" + [User::Password] +
";more blah here".

HTH
=====
Todd C
Post by Screaming Eagles 101
Hi,
I'd like to store the connection password in a variable (DB2 connection)
and then use the variable for the connection in a VS2005 - SQL Server 2005
dtsx project.
Making a package variable is ok, but what about the next step ? How do I use
the variable ?
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------
Loading...