Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Package And Task Failures\Errors

Status
Not open for further replies.

jkb17

Programmer
Nov 27, 2000
156
US
Hello,

I have created a DTS package that I load with a class file in vb.net. I execute the package and it fails on the server; however, I do not receive the failure or error result from the calling application.

How do I retreive a specific tasks failure so that I can report accordingly to our users?

Thanks in advance

James
 
How are you executing the package?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I have implemented the PackageEventsSink.vb from the microsoft website.

I used their sample code:


Private Sub dts_net_sample_execution_code()
Dim pkg As DTS.Package
Try
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
Dim guid As Guid = _
New Guid("10020605-EB1C-11CF-AE6E-00AA004A34D5")
cpContainer.FindConnectionPoint(guid, cpPoint)
Dim intCookie As Integer
cpPoint.Advise(PES, intCookie)
'End - set up events sink
pkg.LoadFromSQLServer("<server>", "<user>", "<password>", _
DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _
"", "", "", "<package name>", Nothing)
'Console.WriteLine("PACKAGE EXECUTION BEGINNING")
pkg.Execute()
'Console.WriteLine("PACKAGE EXECUTION COMPLETED")
'Console.WriteLine("The package contained {0} steps.", _
' pkg.Steps.Count.ToString)
pkg.UnInitialize()
pkg = Nothing
cpPoint.Unadvise(intCookie)
cpPoint = Nothing
cpContainer = Nothing
PES = Nothing
Catch exc As System.Runtime.InteropServices.COMException
Console.WriteLine(exc.Message) '
Catch exc As Exception
'Console.WriteLine(exc.Message)ss
Finally
'Console.ReadLine()
End Try

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top