|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am attempting to load a DTS package from VB.NET. I can load it and can execute it if there are no parameters involved. Also, hardcoding the parameters in the global parameters tab of the package properties and assigning them to the first step works great within SQL Enterprise Manager. However, everything that I have tried when loading into a VB environment comes back with an invalid parameter and the first step failing. I need to pass integer values to the first step (which executes an sp). However, I've tried strings, variants, etc and converting. All giving me the same result. Can someone please help?
pkg = New DTS.Package Dim cpContainer As UCOMIConnectionPointContainer cpContainer = CType(pkg, UCOMIConnectionPointContainer) Dim cpPoint As UCOMIConnectionPoint Dim guid As Guid = New Guid("10020605-EB1C-11CF-AE6E-00AA004A34D5") cpContainer.FindConnectionPoint(guid, cpPoint) Dim intCookie AsInteger pkg.LoadFromSQLServer("WRCDevDB\DevelopmentDB", "AlvinApp", "1baddawg", _ DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _ "", "", "", "CreateandWriteEFTFile", Nothing) pkg.GlobalVariables.Item("ai_eftid").Value = ai_EftID pkg.GlobalVariables.Item("ai_userid").Value = ai_UserId ForEach stp In pkg.Steps stp.ExecuteInMainThread = True Next ( I read on another posting to execute the step before the pkg identifies the variable, but that didn't work either) stp.Execute() pkg.FailOnError = True pkg.Execute() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > DTS Parameter Incorrect from VB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|