Board index » delphi » Best practises for RDM Open/Close
Kog
![]() Delphi Developer |
Best practises for RDM Open/Close2004-06-11 10:00:27 PM delphi199 I'm having a lot of trouble getting Remote Data Module Server Apps to close after applying updates to the clientdataset. What's the best practice for opening/closing TSocketConnections. e.g. Button1 opens the Dataset with code below: with cdsBookDetails do begin if (Active) then Data := Null; Open; // Server App starts RemoteServer.Connected := False; // Server App closes successfully end; Button 2 Updates the dataset and closes the connection: with cdsBookDetails do begin if State = dsEdit then begin Post; ApplyUpdates(0); // Server app starts RemoteServer.Connected := false; // Server App REFUSES to close end; end; The only way I can get this to work successfully is to leave the RemoteServer running until an update is done but I suspect this is not best practice. |