Showing posts with label handling. Show all posts
Showing posts with label handling. Show all posts

Sunday, March 11, 2012

CLR Stored Procedure Exception Handling

Hi,

1) Is there a way to define a global unhandled exception
handler in managed stored procedures?

Something like we're used to in Winform project:

AppDomain.CurrentDomain.UnhandledException
+= new UnhandledExceptionEventHandler(MyHandler);

(I've tried the latter but get some security exception.)

2) Same question about MS Office CLR unhandled exceptions handler...

3) Also, for WebServices Stored Procedure, is there a way to
customize the SOAP Exception <detail> node?

Thanks
Martin1. This is not possible inside SQL Server. If any exception is not handled, SQL Server catches it and sends an appropriate error message to the user. SQL Server does not allow you to specify your own handler for unhandled exceptions.
2. What is the question here? SQL Server does not install an unhandled exception handler.
3. Through native Web Services in SQL Server 2005, there is no mechanism for the user to control what the SOAP fault contains. The old SQL 2000 ASP.Net Web Services mechanism will continue to allow you to capture the Sql exception in the mid-tier and craft the SOAP fault that goes back to the client.

Thanks,
-Vineet Rao

Sunday, February 19, 2012

Client side text handling

I have a text/excel file on client machines. user ( at client side) will be uploading it to Oracle database tables on the server using a client side procedure. I have Oracle client 8.0 loaded on the user/client machines. How can this be achieved. Need something like utl_file. (I am not using oracle Forms or reports so I cannot use text_io)Will SQL Loader not do it? If necessary, you could load into a temporary table and then process in PL/SQL.|||No , It will not serve the purpose as I have to modify & add some contents of the file after some validation. Only then I'll be attaching & sending the same through my client email.