
Err.Raise in OLE Server EXE not raising error in calling program
I have an OLE server with a Delete method with this code:
on error resume next
m_RS.Delete
if err.number<> 0 then
err.raise vbObjectError + 512 + 20, err.source, err.description
exit sub
end if
The caller's code is:
on error resume next
DBATables.Delete
if Err.Number = 0 then
do something
The err.raise in the server is executed because of referential constraints in the
database, however the Err.Number in the caller process is always 0 and the
"do something" lines always execute. The failure is not limited to this method
and call, all err.raise from the server fail in the caller.
This was working previously, something I have done must have broken it, but I
don't have a clue what it was. I would greatly appreciate any help you could
give me.