writing connection functions in activex script task within DTS

Posted on 2006-05-15
Last Modified: 2008-03-03
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;"
Question by:lytung818
    1 Comment
    LVL 75

    Accepted Solution

    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.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    Via a live example, show how to shrink a transaction log file down to a reasonable size.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now