| | |
Raise error does not triggered VB.Net Exception
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
Hi,
I have a VB.Net system that connect to SQL Server through ODBC.
When I try to raiseerror from an IF...ELSE statement, it does not triggered the exception handling.
I have done some raise error testing at my side. Below is my finding:
1. RaiseError did not triggered exception:
2. RaiseError triggered exception:
Any idea why it does not work in IF...ELSE statement?
Thank you.
KC
I have a VB.Net system that connect to SQL Server through ODBC.
When I try to raiseerror from an IF...ELSE statement, it does not triggered the exception handling.
I have done some raise error testing at my side. Below is my finding:
1. RaiseError did not triggered exception:
VB.NET Syntax (Toggle Plain Text)
CREATE PROC xxx AS IF 1=1 BEGIN raiserror (70000,15,15) END
2. RaiseError triggered exception:
VB.NET Syntax (Toggle Plain Text)
CREATE PROC xxx AS IF 1=1 BEGIN raiserror (70000,15,15) raiserror (70000,15,15) END CREATE PROC xxx AS BEGIN raiserror (70000,15,15) END
Any idea why it does not work in IF...ELSE statement?
Thank you.
KC
Last edited by peter_budo; 25 Days Ago at 12:37 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
•
•
Join Date: Oct 2008
Posts: 8
Reputation:
Solved Threads: 1
0
#2 24 Days Ago
Seems related on how SQL handles the severity level.
(http://msdn.microsoft.com/en-us/library/ms178592.aspx)
(http://msdn.microsoft.com/en-us/library/ms178592.aspx)
0
#4 23 Days Ago
try to check if it was handled by a try catch function before it reach to your designated exception error to show. Also check if the option show exception error is check/included.
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
![]() |
Similar Threads
- Server error in application (ASP.NET)
- 'Object variable or With block variable not set' Error (ASP.NET)
- is this Error related to .net or window? (C#)
- Error Message on Start-up...An exception ocurred while trying to run (Viruses, Spyware and other Nasties)
- Server Error in '/' Application (ASP.NET)
- An unhandled exception of type 'System.Net.Sockets.SocketException' error (ASP.NET)
- SQL Create table error (ASP.NET)
- "No Servers are available" Error with ASP.NET Webpage (Networking Hardware Configuration)
- I keep getting an error message on my computer called General Protection Exception... (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Open a Form from OpenFileDialog
- Next Thread: Save and retrieve image in access database
| Thread Tools | Search this Thread |
"crystal .net .net2008 2008 access add advanced application array assignment basic beginner box browser button buttons center click code combo convert cpu cuesent data database datagrid datagridview datetimepicker designer dissertation dissertations dissertationtopic dosconsolevb.net eclipse editvb.net employees excel exists firewall forms html images isnumericfuntioncall listview map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity open pan pdf picturebox picturebox2 port print printpreview record regex reuse right-to-left save search serial settings socket sorting sqldatbase sqlserver storedprocedure temp textbox timer timespan transparency txttoxmlconverter upload useraccounts usercontol vb vb.net vb.nettoolboxvisualbasic2008sidebar vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf wrapingcode xml





