Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9076

Re: SQL Error Handler

$
0
0

No, it won't work.

1) DbNotification is for other purposes (server crash, mirroring)

2) You can't throw an exception in a native event (can't modify the "throws" declaration)

 

You could have a function that takes a SQL request as a string argument and throws an exception if an error occurs.

So you can do this :

 

TRY

     myTrans.of_Exec("INSERT code VALUES (1);UPDATE glob set vary = vary + 7")

 

CATCH (n_transaction_excetion lex)

     MessageBox("Exception", lex.GetMessage())

 

END TRY


Viewing all articles
Browse latest Browse all 9076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>