dbTalk Databases Forums  

Reference an existing connection in my DTS package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Reference an existing connection in my DTS package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Shiangoli via SQLMonster.com
 
Posts: n/a

Default Reference an existing connection in my DTS package - 08-03-2005 , 11:13 AM






All, please may I have your assistance with the following?
I'm trying to reference an existing DTS connection in my activeX script task
rather than instantiating a new connection object with plain text connection
details.
The objective of the DTS package is to upload an XML file details into a
table. I need to make this generic so that the package can be deployed on
different sql servers.

My objective is to replace the follwoing::

'Create and initialize (Open) ADO Connection
Set objADOCnn = CreateObject("ADODB.Connection")
objADOCnn.Open "PROVIDER=SQLOLEDB;SERVER=aaaa;UID=sa;PWD=bbbb;DAT ABASE=dddd;"


If this is not possible what other options are there?


--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...r-dts/200508/1

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Reference an existing connection in my DTS package - 08-03-2005 , 01:57 PM






You can only reference an existing connection in order to grab its general
properties. You cannot use it as a connection AS IS in ADO.

The way to make this generic is to expose essential properties as Global
Variables so in your case it might be

ServerName
UserName
Password
Database
Filename

etc


--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"John Shiangoli via SQLMonster.com" <forum (AT) SQLMonster (DOT) com> wrote

Quote:
All, please may I have your assistance with the following?
I'm trying to reference an existing DTS connection in my activeX script
task
rather than instantiating a new connection object with plain text
connection
details.
The objective of the DTS package is to upload an XML file details into a
table. I need to make this generic so that the package can be deployed on
different sql servers.

My objective is to replace the follwoing::

'Create and initialize (Open) ADO Connection
Set objADOCnn = CreateObject("ADODB.Connection")
objADOCnn.Open
"PROVIDER=SQLOLEDB;SERVER=aaaa;UID=sa;PWD=bbbb;DAT ABASE=dddd;"


If this is not possible what other options are there?


--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...r-dts/200508/1



Reply With Quote
  #3  
Old   
John Shiangoli via SQLMonster.com
 
Posts: n/a

Default Re: Reference an existing connection in my DTS package - 08-04-2005 , 04:57 AM



Allan, many thanks for your help


--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...r-dts/200508/1

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.