Under what circumstances would SQL Server raiseerror not throw an exception back in ADO? (Delphi)



i have a problem that is fully repeatable, but not reproducable - no DDL i
generate will make the problem happen where you are, but it fails every time
here.

i have two tables Quotes, and Foo. i will post the DDL for foo here, since
it is short and simple.
CREATE TABLE foo (id int)

And i create a trigger on each table
CREATE TRIGGER FooTrigger ON foo FOR INSERT, UPDATE AS
RAISERROR('Dummy error', 16, 1);
SELECT 'Dummy select'

CREATE TRIGGER QuotesTrigger ON foo FOR INSERT, UPDATE AS
RAISERROR('Dummy error', 16, 1);
SELECT 'Dummy select'

If i run
Connection.Execute("INSERT INTO foo (id) VALUES (1)");
i get an exception (Delphi safecall mappings raise a language exception.

If i run
Connection.Execute(
"UPDATE Quotes SET QuoteNumber = 'Q50289-4' "+
"WHERE Quotes.QuoteNumber = 'Q50289-4'");
i get no exception


If i use QA and run
INSERT INTO foo (id) VALUES (1)
i get
Server: Msg 50000, Level 16, State 1, Procedure FooTrigger, Line 2
Dummy error

If i use QA and run

(0 row(s) affected)

Server: Msg 50000, Level 16, State 1, Procedure
CheckQuoteNumberMatchesProjectNumber, Line 5
Dummy error

They both behave the same, but i don't an an error in Delphi.


.



Relevant Pages

  • Could not load file or assembly every few days - asp.net 1.1
    ... Could not load file or assembly 'Foo, Version=1.0.2388.18427, ... An unhandled exception occurred during the execution of the ... Please review the stack trace for more information about ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Having to "print" before method invocation?
    ... Hey Fredrik, thanks for responding. ... foo that I've been using without much fuss for a few months now. ... if I add print statements before trying to invoke methods on ... the interpreter won't raise the exception immediately (since it expected you to ...
    (comp.lang.python)
  • Destructors and exceptions
    ... locals appears to be deferred to program exit. ... The only rationale I can think of is to speed up exception ... class Foo: ... def premature_exit: ...
    (comp.lang.python)
  • Re: Having to "print" before method invocation?
    ... foo that I've been using without much fuss for a few months now. ... any attempt to use the instance fails; ... if you get a spurious exception, it's very likely that your C extension sets the ... if you run interpreter code that does something like ...
    (comp.lang.python)
  • Re: compiler warnings for unconditional recursive calls
    ... Hey Jon, you are lightning fast as always:) ... void foo() ... You are right, an exception could terminate the thing, but I wouldn't consider it good style, so a warning wouldn't do any harm. ... Even if the throwwould be executed before the constructor chaining then the Exception would also prevent instantiation. ...
    (microsoft.public.dotnet.languages.csharp)