![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#3
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#4
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#5
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#6
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#7
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#8
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#9
| |||
| |||
|
|
I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim pkgConns As Connections = pkg.Connections Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("Patrol") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
#10
| |||
| |||
|
|
SSIS tends to be a little protective of saved passwords. Why use a script task when you have a built-in task for running a child package? Just curious. You may need to pass the ConnectionString (with password) to the child via a String variable, then set the ConnectionString in the child using an Expression. HTH -- Todd C [If this response was helpful, please indicate by clicking the appropriate answer at the bottom] "xyz_jat" wrote: I'm trying to modify an existing connection for a package which I call from another package using a script task. The connection string gets modified but password does not get modified. Here is the code I'm using - Dim pkg As Package() = app.LoadPackage(MyPackageFullPath, Nothing) Dim ConMgr As ConnectionManager ConMgr = pkg.Connections("MyConnectionString") ConMgr.ConnectionString = "Data Source=MyServer;User ID=MyID;Password=MyPassword;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Persist Security Info=True;" Server, database, User ID information gets modified but password never gets updated and results in failure. Any help is appreciated. Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |