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.
Author |
Topic |
gardan
Starting Member
1 Post |
Posted - 2006-07-22 : 11:16:21
|
Hi all,I need execute DTS package using DTSTransferObjectsTask with parameter or global variable from Visual Basic 6 and set this parameter to task.DestinationPassword. I have already defined global variable: Dim oGlobal As DTS.GlobalVariable Set oGlobal = goPackage.GlobalVariables.New("password") oGlobal = "defaultpass" goPackage.GlobalVariables.Add oGlobal set oGlobal = Nothingand set it to DestinationPassword: oCustomTask1.DestinationPassword = goPackage.GlobalVariables.Item("password").Valuebut it always use "defaultpass" insted of value I have defined in VB source ("mypass") which execute this package: Dim objPackage As New Package objPackage.LoadFromSQLServer "localhost", , , _ DTSSQLStgFlag_UseTrustedConnection, , , , "DTSpackage" objPackage.GlobalVariables.Item("password").Value = "mypass" objPackage.Execute objPackage.UnInitializeThanks for comments/helpGardanp.s. Script has been generated using "import/export wizard", so i guess problem is on lines above. |
|
|
|
|