Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 connection in the DTS package

Author  Topic 

yan19454
Starting Member

3 Posts

Posted - 2006-05-23 : 10:55:48
How can I change the connection in the DTS package ? Thanks.

ciaran
Starting Member

40 Posts

Posted - 2006-05-24 : 10:44:10
if you want to do it programmatically then use an activex component and use sopme thing like the following

for each packageConn in pkg.connections
if packageConn.ProviderID = "SQLOLEDB" then
if packageConn.Name = " the connection name i want to change" then
packageConn.datasource = "My server"
packageConn.Catalog = "Mydatabase"
packageConn.UserId = "My username"
packageConn.Password = "My password"
End if
End if
next
Go to Top of Page
   

- Advertisement -