dbTalk Databases Forums  

Create DTS Connection

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


Discuss Create DTS Connection in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
spenular
 
Posts: n/a

Default Create DTS Connection - 10-05-2004 , 05:29 PM






Is it possible to create DTS connection(s) in C# and add
them to a DTS package created at run time in code?

// Something like this
DTS.Package pkg = new DTS.Package();
DTS.Connection con = new DTS.Connection();
con.DataSource = ...
pkg.Connections.Add(con);

Reply With Quote
  #2  
Old   
Jacco Schalkwijk
 
Posts: n/a

Default Re: Create DTS Connection - 10-06-2004 , 08:02 AM






Yep, that is possible. See the topic "DTS Programming Reference" in SQL
Server Books Online. You have to use the SQL-DMO library, which is a COM
library though.

--
Jacco Schalkwijk
SQL Server MVP


"spenular" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Is it possible to create DTS connection(s) in C# and add
them to a DTS package created at run time in code?

// Something like this
DTS.Package pkg = new DTS.Package();
DTS.Connection con = new DTS.Connection();
con.DataSource = ...
pkg.Connections.Add(con);



Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: Create DTS Connection - 10-06-2004 , 09:06 AM



Thanks. That helps.
Quote:
-----Original Message-----
Yep, that is possible. See the topic "DTS Programming
Reference" in SQL
Server Books Online. You have to use the SQL-DMO library,
which is a COM
library though.

--
Jacco Schalkwijk
SQL Server MVP


"spenular" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:182901c4ab2a$c4203e00$3501280a (AT) phx (DOT) gbl...
Is it possible to create DTS connection(s) in C# and add
them to a DTS package created at run time in code?

// Something like this
DTS.Package pkg = new DTS.Package();
DTS.Connection con = new DTS.Connection();
con.DataSource = ...
pkg.Connections.Add(con);


.


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.