Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages
Started by jane
Thu, 12 Apr 2001 09:18
ado for sqlserver
Author: jane
Date: Thu, 12 Apr 2001 09:18
Date: Thu, 12 Apr 2001 09:18
35 lines
2069 bytes
2069 bytes
The second:
In SQLSERVER database , I have a trigger,
create trigger AINewUser on TSUser for insert as
begin
declare
-- ��.��
if @UserType = 0
begin
insert into TSAppPermi
select @UserID, FModuleID, FFlag, FFlagEx
from TSAppPermi
where FUserID = 0
insert into TSModuleParm
select @UserID, FModuleID, FName, FType, FValue, FValueEx,
FDesc
from TSModuleParm
where FUserID = 0
end
��..
end
you know table TSAppPermi and table TSModuleParm both have more than one
record.when I add a new record to the TADODataSet,and execute it��spost()
method(this can trigger the trigger),
1. if the table TSAppPermi have one record, the Post execute successfully.
2. If the table TSAppPermi have more than one record ,the ApplyUpdate
execute erroyly. The error message Is ��update affeted more than one
record��.
We talk about the error for a long time, we think the ADO Enginer may be
erro. Because we use the ADO for ODBC
Drive,the TADODataSet's Post and Refresh execute successfully.
If you have good news ,don't forget to tell me.
Re: ado for sqlserver
Author: jane
Date: Tue, 24 Apr 2001 08:47
Date: Tue, 24 Apr 2001 08:47
44 lines
2331 bytes
2331 bytes
in right place in trigger,add set oncount on\off jane <janez@pbtco.com> wrote in message news:3ad57172_2@dnews... > The second: > In SQLSERVER database , I have a trigger, > > create trigger AINewUser on TSUser for insert as > begin > declare > -- ��.�� > if @UserType = 0 > begin > insert into TSAppPermi > select @UserID, FModuleID, FFlag, FFlagEx > from TSAppPermi > where FUserID = 0 > insert into TSModuleParm > select @UserID, FModuleID, FName, FType, FValue, FValueEx, > FDesc > from TSModuleParm > where FUserID = 0 > end > ��.. > end > > you know table TSAppPermi and table TSModuleParm both have more than one > record.when I add a new record to the TADODataSet,and execute it��spost() > method(this can trigger the trigger), > 1. if the table TSAppPermi have one record, the Post execute successfully. > 2. If the table TSAppPermi have more than one record ,the ApplyUpdate > execute erroyly. The error message Is ��update affeted more than one > record��. > > We talk about the error for a long time, we think the ADO Enginer may be > erro. Because we use the ADO for ODBC > Drive,the TADODataSet's Post and Refresh execute successfully. > > If you have good news ,don't forget to tell me. > > > > > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads