| | |
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; 20 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 20 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 19 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: check if datatable is empty
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access account arithmetic array assignment basic binary bing button buttons center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist excel file-dialog firewall folder ftp google hardcopy image images insert isnumericfuntioncall listview login math memory mobile ms navigate net networking opacity output passingparameters peertopeervideostreaming picturebox picturebox1 port print problemwithinstallation project reports" save savedialog searchbox serial soap sorting string table tcp temp text textbox timer toolbox trim update updown upload useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio web wpf





