Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages
Started by jane
Tue, 10 Apr 2001 05:01
about ado applied in three-trie app
Author: jane
Date: Tue, 10 Apr 2001 05:01
Date: Tue, 10 Apr 2001 05:01
53 lines
2777 bytes
2777 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.
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