友
友美子
Unregistered / Unconfirmed
GUEST, unregistred user!
ClientDataSet1重复上传,你们遇到这样的情况吗?<br>我是Delphi7和远程SQL2000,多层数据库设计。<br>我把<br>ClientDataSet1的filename设为p.cds<br>添加一条新数据,保存后<br>上传 ClientDataSet1.ApplyUpdates(-1);<br><br>有时发现SQL2000的对应表p里面,有同样的两条数据项(只有我定义的标识【编号】不同)<br>不知道为什么会出现这样的事情?你们是如何解决的?<br><br>、、、、以下是我的大体分析,请指教、、、、<br>我估计是 ClientDataSet1上传后,有时出现错误,上传后ClientDataSet1的Delta没有清空,<br>为什么出现错误呢?是表p或sql200在客户端运行时不可以打开,还是表p设计的有问题(除了【编号】是标识,其它字段都运行为空啊,客户端上传也没有任何关于表p错误操作的提示)<br>==================<br>对了,你们用过高版本的delphi吗?速度等怎么样?有没有这种情况?<br>===============================================================<br>以下是Delta的帮助<br>=============================<br>Delta property (TCustomClientDataSet)<br>=============<br>Represents a packet of change log data<br><br>Delphi syntax:<br><br>property Delta: OleVariant;<br><br>C++ syntax:<br><br>__property System::OleVariant Delta = {read=GetDelta};<br><br>Description<br><br>Use Delta to pass a packet of change log data from the client dataset to a provider. Delta contains only information about those records inserted, modified, or deleted through the client.<br><br>When the client dataset is linked to a provider, Delta is passed as an argument to the ApplyUpdates and Reconcile methods, which use the information in the change log to update the database. On return from successful application of updates, Delta is cleared. If update errors occur, the value of Delta after applying updates depends on the error tolerance allowed by the client dataset. This value is<br><br>All change log data when the maximum number of tolerated errors is encountered and all changes are rolled back.<br> Only those changes that could not be applied when fewer errors occurred than the maximum specified as a tolerance level.<br><br>In file-based applications, Delta is cleared when the changes are merged into the Data property using the MergeChangeLog method.