Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- From: "mustapha.wang" <mustapha.wang@xxxxxxx>
- Date: Thu, 10 Aug 2006 09:30:29 +0800
Thank for your reply.
Yes,the TADODataSet.LockType use ltBatchOptimistic.
If I copy the modified records into a new recordset,but 'Status' of record
is readonly,if I send the stream to Middleware server to update,It can`t
known this is modified data(or deleted or appended) and can`t update.
I want this because of:
Save ADDO data to stream at middleware,then send to client.After client
modified/deleted/appended,it alse save to stream and send back to
middleware.This speed is more faster than TDataSetProvider.Data.
"Steve Zimmelman" <skz@xxxxxxxxxxxxxxxxxx> дÈëÏûÏ¢
news:44da252a@xxxxxxxxxxxxxxxxxxxxxxxxx
Only if you copy the modified records to another recordset and save that
record set to a stream.
When you save the record set to a stream, it saves the entire record set.
It's not like issuing a "post" command that sends data back to the DB.
SaveToStream saves what's in memory.
-Steve-
"mustapha.wang" <mustapha.wang@xxxxxxx> wrote in message
news:44d9693a@xxxxxxxxxxxxxxxxxxxxxxxxx
We known,if set TADODataSet.MarshalOptions as 'moMarshalModifiedOnly',ADO
only send modified data back to DBMS.
But,if savetofile or savetostream can also only save modified data?
function TDMADOStream.ReadData(ADataSet: TDataSet): OLEVariant;
var
ADOStream:_Stream;
begin
ADOStream:=CoStream.Create;
try
OLEVariant(TADODataSet(ADataSet).Recordset).Save(ADOStream,adPersistADTG);
ADOStream.Position:=0;
Result:=ADOStream.Read(ADOStream.Size);
finally
ADOStream:=nil;
end;
end;
.
- References:
- Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- From: mustapha.wang
- Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- From: Steve Zimmelman
- Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Prev by Date: Re: Prepared TADOQuery Question
- Next by Date: Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Previous by thread: Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Next by thread: Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Index(es):
Relevant Pages
|