🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3998

Delete Problem with ADOExpress

#3998
From: Junlin Xie
Date: Wed, 08 May 2002 17:03
38 lines
1874 bytes
Hi,
    I Have a table named 'Employees' with a triggle for deletion, I want to
delete a row from client, I trace the command using SQL Profiler, the
following the tracing message:
    sp_executesql N'DELETE FROM "CELDB".."Employees" WHERE
"EmployeeID"=@P1', N'@P1 int', 23
    EmployeeID is primary key
    and trigger for deletion is:

CREATE TRIGGER tg_Employees_Del ON dbo.Employees
FOR DELETE
AS

DECLARE @EmployeeID T_ID

SELECT @EmployeeID = EmployeeID FROM Deleted

DELETE [dbo].[ResourceACL] WHERE EmployeeID = @EmployeeID

RETURN

the error message:

**************************
Error Number: -2147467259
Error Source: Microsoft Cursor Engine
Error Description: Key information is incorrect, effect multirows.
Error Help File:
Error Help Context:
Error SQL State:
Error NativeError: 1009

but I can execute this command in commandline, It's no problem, why?
Please help me!!!!!

Thank you very much!

Junlin Xie
Technical Details
Message-ID: <3cd9565a_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news.maxwell.syr.edu!newsfeed.online.be!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2516ec76955a76a,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-05-08 09:58:15 PST
From: "Junlin Xie" <jlxie@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Delete Problem with ADOExpress
Date: Thu, 9 May 2002 01:03:48 +0800
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 202.104.117.49
Message-ID: <3cd9565a_1@dnews>
X-Trace: dnews 1020876378 202.104.117.49 (8 May 2002 09:46:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news.maxwell.syr.edu!newsfeed.online.be!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews