Err.Raise in COM+ Component loses Err.Source and Err.Description
- From: "Rich M" <rmabry-nospam@xxxxxxxxxxxx>
- Date: Tue, 11 Apr 2006 14:03:20 -0700
In a COM+ comopnent, we have code which does the following:
Public Sub Delete(ByVal PrimaryKey as Long, ByVal ConnectionString as
String)
Dim cnDBMS As Connection
Set cnDBMS = New Connection
cnDBMS.Open ConnectionString
cnDBMS.Execute "DELETE FROM <tablename here> WHERE <primarykeyfieldname
here> = " & PrimaryKey
GetObjectContext.SetComplete
Set cnDBMS = Nothing
Exit Sub
MTSError:
Set cnDBMS = Nothing
GetObjectContext.SetAbort
Err.Raise Err.Number, Err.Source, Err.Description
End Sub
On the client side, we create an object which creates a remote instance of
the COM+ class and calls the Delete method. If the Delete fails for some
reason (like a foreign key usage issue), an error is raised and we trap it
and report to the user the table where the record is used. This has worked
for a long time.
Now, though, we have issues with the COM+ components on a Windows 2003
Server and *some* clients. On our own network, we have a Windows 2003
Server client that we use via Terminal Services and it works fine. We have
many Windows XP Professional clients and they work fine. There is, however,
one Windows 2000 Professional client that, no matter what I've tried, gets
the Err.Number in the client-side DLL, but the Err.Source is blank and
Err.Description is simply "Automation Error".
I've tried storing the Err info before the SetAbort and re-raising it
afteward - didn't work.
I've tried changing the Err.Number to something else even though it's in the
proper range (vbObjectError + 3604 where 3604 is the ADO error number).
Is there something in Windows 2000 that prevents remote error information?
.
- Follow-Ups:
- Re: Err.Raise in COM+ Component loses Err.Source and Err.Description
- From: Tony Proctor
- Re: Err.Raise in COM+ Component loses Err.Source and Err.Description
- Prev by Date: Re: Dynamic Menu Items
- Next by Date: Re: Dynamic Menu Items
- Previous by thread: Re: Dynamic Menu Items
- Next by thread: Re: Err.Raise in COM+ Component loses Err.Source and Err.Description
- Index(es):
Relevant Pages
|