In previous articles I explained Pass table as parameter to stored procedure in SQL Server, Difference between joins in SQL Server, Convert rows to columns in SQL Server, SQL Query to get duplicate records count and many articles relating to SQL Server, jQuery, JavaScript. Now I will explain how to handle exceptions in SQL Server.
BEGIN TRY
---Write
Your Code
END TRY
BEGIN CATCH
---Write
Code to handle errors
END CATCH
|
BEGIN TRY
SELECT 300/0
END TRY
BEGIN CATCH
SELECT ErrorNumber = ERROR_NUMBER(), ErrorSeverity =
ERROR_SEVERITY(),
ErrorState = ERROR_STATE(),
ErrorProcedure = ERROR_PROCEDURE(), ErrorLine = ERROR_LINE(),
ErrorMessage = ERROR_MESSAGE()
END CATCH
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|

Subscribe by RSS
Subscribe by Email
8 comments :
how to create calendar which specify special events? plz plz help me....
Hi Suresh,
this is sunil from delhi..
there is 1 question that
how to ONLY INSERT the multiple records into sqlserver database table in one go.
thnx in advance
waiting for your reply.... :)
Hi Suresh,
Ignore my previous post...
this is sunil from delhi..
there is 1 question that
how to ONLY INSERT the multiple records into sqlserver database table in one go using GridView.
thnx in advance
waiting for your reply.... :)
Hi suresh sir,
This is J.Prabu, how can i ask my question, kindly give me the details to share my doubt.
good one
Hello Sir,
Is there any directly PHP to ASP.NET website conversion application??? if yes .. plz send me link for that...
thank you...
vgfgg
by using Foreach loop you can insert the Data in One Click in the Database.