Article View: borland.public.cppbuilder.database.multi-tier
Article #660ado for sqlserver
From: jane
Date: Tue, 10 Apr 2001 05:41
Date: Tue, 10 Apr 2001 05:41
53 lines
2842 bytes
2842 bytes
The first:
For three_tier application,on the appliction server, I put a
TADOConnection,a TADODataSet,a TDataSetProvider
In the Transaction Data Module. The TADOConnect connect a SQLSERVER
database.
On the Client application. I have a TDCOMConnection, a TClientDataSet when
I set the server application��s
TADODataSet��s property Active = true , then the client application��s
TClientDataSet��s execute the Refresh()
method,the error ��recored used by another user��. But I set the server
application��sTADODataSet��s
property Active = false , the TClientDataSet��s execute the Refresh()
rightly.
Why????
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 TClientDataSet,and execute it��s
ApplyUpdates(0)(this can trigger the trigger),
1. if the table TSAppPermi have one record, the ApplyUpdate execute rightly.
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 TClientDataSet��s ApplyUpdates and Refresh execute rightly.
If you have good news ,don't forget to tell me.
Technical Details
Message-ID:
<3ad29b77_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fcd2b,4f59484dbb30e3ca,start X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2001-04-09 22:44:07 PST Reply-To: "jane" <janez@pbtco.com> From: "jane" <janez@pbtco.com> Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: ado for sqlserver Date: Tue, 10 Apr 2001 13:41:50 +0800 Lines: 59 Organization: powerbridge X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 202.104.184.237 Message-ID: <3ad29b77_1@dnews> X-Trace: dnews 986880887 202.104.184.237 (9 Apr 2001 22:34:47 -0700) Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews