Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Programmatic. Change The DataSource of A DTS Connect
Message
From
17/08/2006 10:18:43
 
 
To
17/08/2006 10:07:04
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01146364
Message ID:
01146373
Views:
21
Ok, I found that... it's what I need. Thank you :-)

Option Explicit
Function Main()
' Declare Variables
Dim oPKG
Dim oConnection
' Get Package Object
Set oPKG = DTSGlobalVariables.Parent
' Get Named Connection
Set oConnection = oPKG.Connections("Text File (Source)")
' Set Filename to new value
oConnection.DataSource = "X:\YourPath\YourFile.txt"
Set oConnection = Nothing
Set oPKG = Nothing

Main = DTSTaskExecResult_Success
End Function
Marc Levesque
La Prairie, Quebec (CANADA)
marc.levesque@videotron.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform