![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi, I found a lot of resources on the internet to execute a DTS package from VB.net. I tested my code on a test DTS package to make sure it worked and it did. The vb code does work for a DTS package that does not prompt for a value. Now, the real DTS package I have to run, does not work, it seems to hang. This DTS package (when you run it from enterprise manager) prompts for a value in an input box when you run it. I think this is causing the problem.... I did not write the DTS package and don't know how to do so... So... I want to pass a variable to the DTS package through VB.net. The DTS package is prompting for a user input when you run it from enterprise manager. Do I need to change the DTS code or the code in VB? Here's my VB code for reference: Dim DTSParameter As String Dim dtsImport As New DTS.Package2 Dim stp As DTS.Step DTSParameter = DropDownList1.SelectedItem.Value With dtsImport .LoadFromSQLServer("SQLSERVER", "sa", "thepassword", , , , , "DTS Package") .GlobalVariables.AddGlobalVariable("PROMPTEDVALUE" , DTSParameter) .FailOnError = True .Execute() End With Thanks, -C |
![]() |
| Thread Tools | |
| Display Modes | |
| |