![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am a newbie to DTS. What I am doing now is I have created a set of DTS packages, which are executed one from another. I am now preparing a frontend |
|
I do not want the code to start all the tasks in the packages for me. All I want is to pass the parameters AND execute the first package, which will |
|
Any samples would be greatly appreciated! Kaspian |
#3
| |||
| |||
|
#4
| ||||||
| ||||||
|
|
Thanks Alan for Your prompt reply! As a matter of fact, I already succeded in executing my first package from within an application (.net windows form, visual basic), after reading the |
|
It is the parameters which bother me. I am using this code (there are no security issues, the package runs fine without parameters) Sub btn_run_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_run.Click Dim pkg As DTS.Package2 Dim objGlobal1 As DTS.GlobalVariable Try pkg = New DTS.Package2() pkg.LoadFromSQLServer("servername", "username", "password", DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", "packagename", |
|
For Each objGlobal1 In pkg.GlobalVariables MessageBox.Show(objGlobal1.Name) If objGlobal1.Name = "Date1" Then objGlobal1.Value = txtdate.Text objGlobal1.Value = DateTime.ToString(objGlobal1) MessageBox.Show(objGlobal1.Value) ElseIf objGlobal1.Name = "Date2" Then objGlobal1.Value = txtdate2.Text objGlobal1.Value = DateTime.ToString(objGlobal1) MessageBox.Show(objGlobal1.Value) End If Next pkg.Execute() pkg.UnInitialize() pkg = Nothing Catch exc As System.Runtime.InteropServices.COMException MessageBox.Show(exc.Message) Catch exc As Exception MessageBox.Show(exc.Message) End Try End Sub As I mentioned, I have no problems whatsoever with executing the package per se from this code. It is when I introduce the global variables that I |
|
I constantly get the message: "Parameter is incorrect" within a package execution log. When I insert the two values I am trying to pass as paramters directly into the select statement of the data pump task, the package executes |
|
I suppose there is a problem with the format of the values I want to pass as parameters. I just do not know where else to look - what else can go |
|
Do You have any idea where I should look? Kind regards, Kaspian |
![]() |
| Thread Tools | |
| Display Modes | |
| |