Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Advice
Advice
Posted: 2007/10/04 23:35
 
Hi,
I must develop a thinDAC client and server where I need that client do a transaction say with 100 records and commit the records to the server (write to disk) after the records are written to the disk I must do some operation using the saved records. Which components or events help me to do this?
I use as DB NexusDB
Regards
Rocco Neri
Re:Advice
Posted: 2007/10/05 22:56
 
Hello Rocco

After updates are posted to the server, the TTDxxxProcessor.OnFinishUpdates event handler is fired. So, you can take some actions there.

Regards,
Dmitry
Re:Advice
Posted: 2007/10/06 00:05
 
Diman wrote:
Hello Rocco

After updates are posted to the server, the TTDxxxProcessor.OnFinishUpdates event handler is fired. So, you can take some actions there.

Regards,
Dmitry


Hi Dmitry,
I already tried to put my code inside the TDSQLProcessor.OnFinishUpdates event, but the data are written to the disk only after all my code is executed.
I need data are written to the disk before my code is executed.
Maybe when this event is fired, the data are still cached in the server memory. Any other suggestion?

Regards
Rocco

Post edited by: RoccoNeri, at: 2007/10/06 00:07
Re:Advice
Posted: 2007/10/07 23:31
 
Hello Rocco

Open daADTDServer.pas, and add following method to the public section of the TTDUpdatesInfo class:

 procedure TTDUpdatesInfo.EndTransaction(ASuccessBoolean); begin   FProv.PSEndTransaction(ASuccess);   FInTransaction := True; end;


Then write event handler like that:

 procedure TForm1.TDSQLProcessorFinishUpdates(ASenderTObjectAInfoTTDUpdatesInfo; var ADefaultActionBoolean); begin   AInfo.EndTransaction(True);   // here goes your code end;



Regards,
Dmitry

Post edited by: Diman, at: 2007/10/07 23:32
Re:Advice
Posted: 2007/10/08 06:21
 
Dimtry

Now it works, Thankyou for your great support.

Regards
Rocco