🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages Started by jane Tue, 10 Apr 2001 05:41
ado for sqlserver
#660
Author: jane
Date: Tue, 10 Apr 2001 05:41
53 lines
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.
Re: ado for sqlserver
#686
Author: 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.
>
>
>
>
>
>
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