🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #686

Re: ado for sqlserver

#686
From: jane
Date: Tue, 24 Apr 2001 08:46
65 lines
3159 bytes
in right place in trigger,add set nocount on/off.
the question can solved.

jane <janez@pbtco.com> wrote in message news:3ad29b77_1@dnews...
> 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: <3ae53b90_1@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!europa.netcrusader.net!195.238.2.15!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3ad29b77_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fcd2b,4f59484dbb30e3ca
X-Google-Attributes: gidfcd2b,public
X-Google-ArrivalTime: 2001-04-24 01:58:05 PST
Reply-To: "jane" <janez@pbtco.com>
From: "jane" <janez@pbtco.com>
Newsgroups: borland.public.cppbuilder.database.multi-tier
References: <3ad29b77_1@dnews>
Subject: Re: ado for sqlserver
Date: Tue, 24 Apr 2001 16:46:39 +0800
Lines: 67
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: 61.143.60.103
Message-ID: <3ae53b90_1@dnews>
X-Trace: dnews 988101520 61.143.60.103 (24 Apr 2001 01:38:40 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!europa.netcrusader.net!195.238.2.15!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews