Err.Raise in COM+ Component loses Err.Source and Err.Description

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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?




.



Relevant Pages

  • Re: Err.Raise in COM+ Component loses Err.Source and Err.Description
    ... Public Sub Delete(ByVal PrimaryKey as Long, ByVal ConnectionString as ... Set cnDBMS = New Connection ... Now, though, we have issues with the COM+ components on a Windows 2003 ... Server client that we use via Terminal Services and it works fine. ...
    (microsoft.public.vb.general.discussion)
  • Re: Err.Raise in COM+ Component loses Err.Source and Err.Description
    ... The "Set cnDBMS = Nothing" line is actually something I added trying to get ... Public Sub Delete(ByVal PrimaryKey as Long, ByVal ConnectionString as ... On the client side, we create an object which creates a remote instance ... Now, though, we have issues with the COM+ components on a Windows 2003 ...
    (microsoft.public.vb.general.discussion)
  • Re: Err.Raise in COM+ Component loses Err.Source and Err.Description
    ... we have one machine here acting as the application server and ... Using the same SERVER machine and varying CLIENT machines running the same ... Public Sub Delete(ByVal PrimaryKey as Long, ByVal ConnectionString as ... Set cnDBMS = New Connection ...
    (microsoft.public.vb.general.discussion)
  • Methoden an Datacontract freigeben
    ... Intanzen des Datamembers auch am Client verwendet werden kann. ... public System.Guid SessionGUID ... public string ConnectionString ... private bool _Connected; ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: ODBC-Verbindung zu {SQL Native Client}(schulelb002) fehlgeschlagen.
    ... Habe sql client auf meinem PC schon installiert und das komische daran ist, ... oder kann ich vielleicht den ConnectionString vom visuellen odbc Tool ... Muss ich etwa einen ODBC Driver am Server oder am Client installieren? ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)