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: -
CREATE PROC xxx
-
AS
-
IF 1=1
-
BEGIN
-
raiserror (70000,15,15)
-
END
2. RaiseError triggered exception: -
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
It managed to work on mine. Here's the error that returned: -
-
Msg 18054, Level 16, State 1, Procedure xxx, Line 6
-
Error 70000, severity 15, state 15 was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.
-
-
Happy Coding!!!
--- CK
3 4093
It managed to work on mine. Here's the error that returned: -
-
Msg 18054, Level 16, State 1, Procedure xxx, Line 6
-
Error 70000, severity 15, state 15 was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.
-
-
Happy Coding!!!
--- CK
Hi ck9663,
The testing is done in Sql Server Query Windows/Pane right?
This testing works on my side too.
But when I connect VB.NET system through ODBC to SQL Server, the raise error inside IF statement does not work. No exception is triggered.
Thank you.
KC
Here, read this...
Happy Coding!!!
--- CK
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Kong Li |
last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset
(9.2.0.5) fixed the handle count leak problem. The problem is in
Oracle client component.
Thanks.
Kong
-----
From: Kong...
|
by: kamilla |
last post by:
I have a mysql 3.5 server installed on a suse linux 8.1, with address 10.0.0.100.
Now I want to access that db from a W2K pc, address 10.0.0.200.
I am able to ping 10.0.0.100, but I cannot connect...
|
by: MNC |
last post by:
I'm using Access2002, and can't seem to get an updateable recordset going
:-(
What am I doing wrong, here's the code. The form's controls are not locked,
the recordset type is Dynaset (changing...
|
by: effendi |
last post by:
Hi I downloaded MSDE2005 and I tried to set up an ODBC connection to a
database I created. I can see the database using client but I got this
error through the ODBC manager
An error has occurred...
|
by: coosa |
last post by:
Hi,
I was installing SQL Server on my machine and during installation my PC
freezed. It happens frequently on my machine. So i tried after
restarting to install it again and since then i always...
|
by: shsandeep |
last post by:
We are trying to connect from DataStage to a DB2 database on Z/OS. It
connects fine from the DataStage server, but when connecting from
DataStage client it gives the following error:
...
|
by: alegria4ever |
last post by:
I have an Access 2000 database that links several tables from Oracle 9.
For some reason or another, one of our user repeatedly gets the
following error when accessing queries within this database:...
|
by: n8kindt |
last post by:
hi guys, i am also posting this question in the MySQL forum but am putting the detailed post on here. here is the message i am having problems with:
...
|
by: devas |
last post by:
Hai,
Issue: I am using OEM 10g grid control. I want to establish the connection from oracle to sql server=>I can’t able to connect it. Please help me
I have created the system dsn below steps....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |