February 21, 2005 at 8:19 am
Hi guys
I have an application which is to use a UDL, but what I would really like is to be able to pass the location of the udl to the package and change it programatically.
I have been able to do this with other data sources such as XL with the commands
Set oConn = DTSGlobalVariables.Parent.Connections("Microsoft Excel 97-2000")
oConn.DataSource = DTSGlobalVariables("Filename").Value
however within the UDL, the data source is UDL, not the path to the UDL. Does anyone know how/if I can change this and if so what the syntax would be
thanks in advance
Ross Carr
February 21, 2005 at 7:32 pm
February 22, 2005 at 12:36 pm
hi darrell
have been through these with no luck to date
can easily change the standard properties, what i need is a way to change the path to the UDL
thanks anyway
Ross
February 22, 2005 at 1:11 pm
Ross,
Try this:
Set oCn = DTSGlobalVariables.Parent.Connections("MyUDLTest")
oCn.UDLPath = fully qualified path & "MyUDL.udl"
February 22, 2005 at 10:01 pm
I use this code when I need to use a UDL file to instantiate a connection...
Dim oConn, sUDLFile
sUDLFile = DTSGlobalVariables("gsPubsUDL").Value
Set oConn = CreateObject("ADODB.Connection")
oConn.Open "file name=" & sUDLFile
SQL Server MVP
Solid Quality Learning
February 23, 2005 at 7:39 am
Cheers DSP
Works like a charm...you have no idea how long I have spent on that!!!
wouldn't it be nice if it was called the same as on the screen!
cheers m8
Ross
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply