Under what circumstances would SQL Server raiseerror not throw an exception back in ADO? (Delphi)
- From: "Ian Boyd" <ian.msnews010@xxxxxxxxxxxx>
- Date: Fri, 7 Jul 2006 15:43:45 -0400
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.
.
- Follow-Ups:
- Prev by Date: Yony
- Next by Date: Re: Error 3251 using ADO & VBA to drop a table!
- Previous by thread: Yony
- Next by thread: Re: Under what circumstances would SQL Server raiseerror not throw an exception back in ADO? (Delphi)
- Index(es):
Relevant Pages
|
|