谢谢!!!
解决方案 »
- 字符查找找出字符中头尾标志的并取出来
- 请教一个IcmpSendEcho的问题
- 如何隐藏窗口,使它只剩下标题栏?(要对所有有标题栏的窗口都适用,比如计算器。)
- Delphi中用DBMemo修改数据,保存不上问题?
- 请教:如何用delphi实现windows资源管理器中的文件搜索功能
- DLL动态库问题,高手请进!
- 请问,数据转换的问题
- 备份SQL SERVER数据库出错!
- 求Delphi5的序列号,安上就给分
- 请问哪里有 delphi6 的 web services 制作教程?
- 请问怎样使用Delphi中的TADODataset控件获取COM+返回的Recordset?
- 高分求教IS Express安装制作工具,分不够加多少都没问题啊!!!!!
在客户端和服务器端建立一个SOCKET连接。一旦数据发生变化,服务器通过SOCKET发送给客户端一个消息,一旦客户端接收到这个消息,就刷新一次~
服务器端编一个SaveData函数,这个函数中要接受客户端ClientDataSet的Delta数据,在执行完更新数据库后,把Delta数据在返回给客户端,在客户端分析Delta数据,以更新客户端的ClientDataSet中的数据。不知道我有没有正确理解你的意思
可以用cds的refresh方法,但不推荐,delphi帮助里提到一个cds有一个recordRefresh方法
可以在cds的afterscroll事件时调用,这样一但有新的变动,就会尽快返应到数据表格中。Client datasets can also update the data while leaving the change log intact. To do this, call the RefreshRecord method. Unlike the Refresh method, RefreshRecord updates only the current record in the client dataset. RefreshRecord changes the record value originally obtained from the provider but leaves any changes in the change log.WarningIt is not always appropriate to call RefreshRecord. If the user's edits conflict with changes made to the underlying dataset by other users, calling RefreshRecord masks this conflict. When the client dataset applies its updates, no reconcile error occurs and the application can't resolve the conflict. In order to avoid masking update errors, you may want to check that there are no pending updates before calling RefreshRecord. For example, the following AfterScroll refreshes the current record every time the user moves to a new record (ensuring the most up-to-date value), but only when it is safe to do so.:procedure TForm1.ClientDataSet1AfterScroll(DataSet: TDataSet);
begin
if ClientDataSet1.UpdateStatus = usUnModified then
ClientDataSet1.RefreshRecord;
end;