Hello,
here is my code which works to run a DTS package from my VB.NET app:
Public Sub ExecutePackage(ByVal sServer As String, ByVal sPackageName As String, ByVal sPackageGuid As String)
Dim opak As New Package2Class
opak.LoadFromSQLServer(sServer, "test", "access", , , sPackageGuid, , sPackageName)
opak.Execute()
End Sub
Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click
Dim oConsol As New IMPORT.Consolidate
Me.txtMsg.Text = vbNullString
AppendMsg("Loading validation process...")
'TO DO: Trap DTS Failure
AppendMsg("Invoices Exported")
AppendMsg("Invoice Export Complete")
oConsol.ExecutePackage("TESTSERVER", "TEST", "{8920CA6F-58B7-46C1-8C2C-F4B3D1E426B6}")
End Sub
Not sure how to trap a the error should the DTS package fail. I don't need a specific error, just a general failure error. If someone could show me I'd really appreciate it.
Thanks,
Dennis
here is my code which works to run a DTS package from my VB.NET app:
Public Sub ExecutePackage(ByVal sServer As String, ByVal sPackageName As String, ByVal sPackageGuid As String)
Dim opak As New Package2Class
opak.LoadFromSQLServer(sServer, "test", "access", , , sPackageGuid, , sPackageName)
opak.Execute()
End Sub
Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click
Dim oConsol As New IMPORT.Consolidate
Me.txtMsg.Text = vbNullString
AppendMsg("Loading validation process...")
'TO DO: Trap DTS Failure
AppendMsg("Invoices Exported")
AppendMsg("Invoice Export Complete")
oConsol.ExecutePackage("TESTSERVER", "TEST", "{8920CA6F-58B7-46C1-8C2C-F4B3D1E426B6}")
End Sub
Not sure how to trap a the error should the DTS package fail. I don't need a specific error, just a general failure error. If someone could show me I'd really appreciate it.
Thanks,
Dennis