writing connection functions in activex script task within DTS

does anybody know whether i can write a simple connection string within DTS activex script task?

i have various function that uses the same connection. I find myself typing this a lot

 'Create and initialize (Open) ADO Connection
      Set objADOCnn = CreateObject("ADODB.Connection")
      objADOCnn.Open "PROVIDER=SQLOLEDB;SERVER=;UID=xxxPWD=xxx;DATABASE=fastpic2;"
lytung818Asked:
Who is Participating?
 
Anthony PerkinsCommented:
You can, but I don't see the point (not to mention the security risk in having the password in clear text).  You are better off adding a SQL Server (Microsoft OLE DB Provider for SQL Server) Connection.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.