I have a VB .NET program that runs a SQL Server 2000 DTS package. When I execute the DTS package in Enterprise Manager, I get this error and the package stops executing.
The task reported failure on execution.
The statement has been terminated.
Cannot insert duplicate key row in object 'STANDARD_CODES' with unique index 'F055_K01'.
However, when I execute the DTS package from VB .NET, it never throws an exception. When I debug, I can see that the program just stops executing in this sub.
Has anyone run into this problem before?
The task reported failure on execution.
The statement has been terminated.
Cannot insert duplicate key row in object 'STANDARD_CODES' with unique index 'F055_K01'.
However, when I execute the DTS package from VB .NET, it never throws an exception. When I debug, I can see that the program just stops executing in this sub.
Code:
Overridable Overloads Sub OnQueryCancel(ByVal EventSource As String, _
ByRef pbCancel As Boolean) _
Implements DTS.PackageEvents.OnQueryCancel
If EventSource.Length > 0 Then
Console.WriteLine(" OnQueryCancel in {0}; pbCancel = {1}", _
EventSource, pbCancel.ToString)
Else
Console.WriteLine(" OnQueryCancel; pbCancel = {0}", _
pbCancel.ToString)
End If
pbCancel = False
End Sub
Has anyone run into this problem before?