トランザクションの下でコードを実行してから appplayUpdates を呼び出し、エラーをキャッシュして修正します。しかし、Delphi 7 で機能していた調整コードは、Delphi 2009 では無限ループに陥ります。
table1.Connection.BeginTrans;
//some code
repeat
try
numberOfErrors := table2.ApplyUpdates(-1); // here the returned value in delphi 2009 is 3457496 why?
if (numberOfErrors > 0) then
fixValuesTable2;
Except
fixValuesTable2;
end;
until numberOfErrors=0;
table1.Connection.CommitTrans;
table1 と table2 は接続を共有します。
ClientDataSet は、delphi 7 から delphi 2009 への使用上の慣習で変更されましたか?
プロバイダーは TDataSetProvider であり、ADO コンポーネントから mssql データベースに接続されています。