![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to call a DTS package from a VB.Net application. If my application is on the DB server it works correctly. If I move the application to another server the DTS packge is not run and no errors are reported. Any ideas ? pkg = New DTS.Package 'Begin - set up events sink Dim cpContainer As UCOMIConnectionPointContainer cpContainer = CType(pkg, UCOMIConnectionPointContainer) Dim cpPoint As UCOMIConnectionPoint Dim PES As PackageEventsSink = New PackageEventsSink Output.Text = "<Start>" + vbCrLf Dim guid As Guid = _ New Guid("10020605-EB1C-11CF-AE6E-00AA004A34D5") cpContainer.FindConnectionPoint(guid, cpPoint) Dim intCookie As Integer cpPoint.Advise(PES, intCookie) 'pkg.LoadFromSQLServer("<server>", "<user>", "<password>", _ ' DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _ ' "", "", "", "<package name>", Nothing) '".", "sa", "" pkg.LoadFromSQLServer("192.168.100.100", "sa","", _ DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _ "", "{A9CC66EC-E458-4284-BE79-1D49D2187514}", "", "AKPAckageTest", Nothing) 'DTSSQLServerStorageFlags.DTSSQLStgFlag_Default ''MessageBox.Show("Execute") pkg.Execute() ''MessageBox.Show("Finished") pkg.UnInitialize() pkg = Nothing cpPoint.Unadvise(intCookie) cpPoint = Nothing cpContainer = Nothing PES = Nothing Catch exc As System.Runtime.InteropServices.COMException ''Output.Text = Output.Text + exc.Message + vbCrLf MessageBox.Show(exc.Message) errorFound = 1 Catch exc As Exception ''Output.Text = Output.Text + exc.Message + vbCrLf MessageBox.Show(exc.Message) errorFound = 1 Finally Output.Text = Output.Text + "<Finish>" + Date.Now().ToString + vbCrLf End Try |
#3
| |||
| |||
|
|
I am trying to call a DTS package from a VB.Net application. If my application is on the DB server it works correctly. If I move the application to another server the DTS packge is not run and no errors are reported. Any ideas ? pkg = New DTS.Package 'Begin - set up events sink Dim cpContainer As UCOMIConnectionPointContainer cpContainer = CType(pkg, UCOMIConnectionPointContainer) Dim cpPoint As UCOMIConnectionPoint Dim PES As PackageEventsSink = New PackageEventsSink Output.Text = "<Start>" + vbCrLf Dim guid As Guid = _ New Guid("10020605-EB1C-11CF-AE6E-00AA004A34D5") cpContainer.FindConnectionPoint(guid, cpPoint) Dim intCookie As Integer cpPoint.Advise(PES, intCookie) 'pkg.LoadFromSQLServer("<server>", "<user>", "<password>", _ ' DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _ ' "", "", "", "<package name>", Nothing) '".", "sa", "" pkg.LoadFromSQLServer("192.168.100.100", "sa","", _ DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _ "", "{A9CC66EC-E458-4284-BE79-1D49D2187514}", "", "AKPAckageTest", Nothing) 'DTSSQLServerStorageFlags.DTSSQLStgFlag_Default ''MessageBox.Show("Execute") pkg.Execute() ''MessageBox.Show("Finished") pkg.UnInitialize() pkg = Nothing cpPoint.Unadvise(intCookie) cpPoint = Nothing cpContainer = Nothing PES = Nothing Catch exc As System.Runtime.InteropServices.COMException ''Output.Text = Output.Text + exc.Message + vbCrLf MessageBox.Show(exc.Message) errorFound = 1 Catch exc As Exception ''Output.Text = Output.Text + exc.Message + vbCrLf MessageBox.Show(exc.Message) errorFound = 1 Finally Output.Text = Output.Text + "<Finish>" + Date.Now().ToString + vbCrLf End Try |
![]() |
| Thread Tools | |
| Display Modes | |
| |