all groups > sql server dts > august 2005 >
You're in the

sql server dts

group:

Using connections outside of an ActiveX Script Task


Using connections outside of an ActiveX Script Task Snake
8/12/2005 9:32:02 AM
sql server dts:
Is there a way an ActiveX Script Task can use an existing connection object
already in the package? The examples I have rely on ADO db connections
created by the ActiveX Script Task, causing a maintenance issue when we move
packages from one server to another or passwords change, etc. People 'forget'
to check each ActiveX Script Task to see it it establishes its own ADO
connection with hard-coded server names, userid's and passwords (an evil
coding technique). An example using such a connection would be nice!

Thanks,

Re: Using connections outside of an ActiveX Script Task Darren Green
8/12/2005 10:31:49 PM
In message <22C88EA5-9D22-46E4-A11C-74446E3E9A1A@microsoft.com>, Snake
<Snake@discussions.microsoft.com> writes
[quoted text, click to view]

It is not possible I'm afraid. If using integrated security then you can
build the ADO connection string from a DTS connection, but the password
is write only so no good for SQL security.

I store connection strings, or more often their constituent parts in
global variables to make them more accessible, reusable, and visible.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
Re: Using connections outside of an ActiveX Script Task Snake
8/15/2005 10:52:03 AM
Thanks Darren,
I too use global variables for this purpose, but I have found that they are
not so "visible" to others, some of whom focus on the connection objects
only! Oh well.
Thanks,

[quoted text, click to view]
Re: Using connections outside of an ActiveX Script Task Darren Green
8/15/2005 10:48:55 PM
Add some annotations perhaps to help highlight "hidden" code and
settings. I often do this when using Workflow scripts for example as
they are easily missed.

Perhaps the way you move packages needs looking at. I have standard ways
of getting login info, which covers my global variables, so everyone
knows how it works. Easier said than done I know.

Alternatively buy a baseball bat and educate people.


In message <3DFA174B-2511-4F6B-8D8F-62DBB0C18454@microsoft.com>, Snake
<Snake@discussions.microsoft.com> writes
[quoted text, click to view]

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
AddThis Social Bookmark Button