472,119 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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 1554
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.

Similar topics

3 posts views Thread by dhussong | last post: by
41 posts views Thread by Stuart Golodetz | last post: by
1 post views Thread by George2 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.