EDatabaseError 'Update failed. Found 2 records'.
Posted: Fri 27 Jun 2014 09:45
Hi,
I get the following error:
It is caused by an AFTER INSERT TRIGGER on the table that is being inserted to.
As you can see the trigger does an additional INSERT into another table, but that causes the TMSQuery to fail.
Any ideas?
I get the following error:
Code: Select all
EDatabaseError 'Update failed. Found 2 records'.Code: Select all
CREATE TRIGGER
[dbo].[AdresseAfterInsert]
ON
[dbo].[Adresse]
AFTER INSERT
AS
INSERT INTO
[dbo].[AdresseDatenkreis]
(
[Adresse_ID]
, [Datenkreis_ID]
, [Zugeordnet]
)
SELECT
ins.[Adresse_ID]
, dat.[Datenkreis_ID]
, dat.[Default]
FROM
[inserted] ins
CROSS JOIN
[dbo].[Datenkreis] dat
WHERE
dat.[Ruecklaeufer] = 0Any ideas?