469,607 Members | 2,075 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

Exception handling and the call stack?

An ASP app is calling a T-SQL stored procedure, which creates and instance of a DLL and calls one of its methods. The DLL method creates an instance of an API to process credit card transactions.

The client is seeing an OLE DB object error message, presumably raised by the ASP app after the stored procedure fails to call the DLL method. However, I believe the actual failure is occuring when the DLL method attempts to create an instance of the API.

Any links or advice on how to get to the bottom (literally) of the error message and find the actual exception from the actual source would be greatly appreciated.

- carl
Nov 16 '05 #1
1 1464
Carl,

I think that the best you are going to be able to do is get the error
message that SQL Server throws back to you. You should get an exception
when the stored proc is called. You should catch it, and check the Errors
property. There should be a SqlError instance that has information about
the OLE error code. At that point, I think you would have to parse it apart
for the code. Once you have that, you can pass the value to the static
ThrowExceptionForHR method on the Marshal class to throw an exception that
maps to that code.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Vagabond Software" <carlfenley-X-@-X-san.rr.com> wrote in message
news:O8**************@TK2MSFTNGP09.phx.gbl...
An ASP app is calling a T-SQL stored procedure, which creates and instance
of a DLL and calls one of its methods. The DLL method creates an instance
of an API to process credit card transactions.

The client is seeing an OLE DB object error message, presumably raised by
the ASP app after the stored procedure fails to call the DLL method.
However, I believe the actual failure is occuring when the DLL method
attempts to create an instance of the API.

Any links or advice on how to get to the bottom (literally) of the error
message and find the actual exception from the actual source would be
greatly appreciated.

- carl
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.