关键问题是我试了没有达到我的要求,才来问你们。用户要删除,更改一些数据,程序等用户操作完成之后再一起处理。比如他删除了一些记录,程序要同时更新其他表的一些字段(不能在他删除记录时就处理其他表的记录,因为希望能提供用户取消操作的功能,所以只能等用户确认操作全部结束且正确后再处理,有点象批处理)。adoquery 的 RecordStatus 属性,有如下属性:rsNew The row is a new insert. rsModified The row has been modified. rsDeleted The row has been deleted. rsUnmodified The row has not been modified since being retrieved.其他都能正确判断,但 rsDeleted 根本无法得到!! 请大家帮忙。谢谢
我对adoq(批量更新方式打开)的记录集进行了一些操作,然后调用下面的函数,被删除的记录根本无法访问的。现在问题就是我要知道怎么访问!!!!!!!!!在线等 var tpUM, tpM, tpD, tpN: String; begin with Adoq do begin First; while not eof do begin if (rsUnmodified in RecordStatus) then tpUM := tpUM + Inttostr(RecNo) + '-';//'Unchanged record'; if (rsModified in RecordStatus) then tpM := tpM + Inttostr(RecNo) + '-';// 'Changed record'; if (rsDeleted in RecordStatus) then tpD := tpD + Inttostr(RecNo) + '-';// 'Deleted record'; if (rsNew in RecordStatus) then tpN := tpN + Inttostr(RecNo) + '-';// 'New record'; Next; end; end; showmessage('UM: ' +tpUM); showmessage('M: ' +tpM); showmessage('Del: '+tpD); showmessage('New: '+tpN); end;
只放在缓存里,能不能访问不清楚
取消以后就可以访问了吧
关键问题是我试了没有达到我的要求,才来问你们。用户要删除,更改一些数据,程序等用户操作完成之后再一起处理。比如他删除了一些记录,程序要同时更新其他表的一些字段(不能在他删除记录时就处理其他表的记录,因为希望能提供用户取消操作的功能,所以只能等用户确认操作全部结束且正确后再处理,有点象批处理)。adoquery 的 RecordStatus 属性,有如下属性:rsNew The row is a new insert.
rsModified The row has been modified.
rsDeleted The row has been deleted.
rsUnmodified The row has not been modified since being retrieved.其他都能正确判断,但 rsDeleted 根本无法得到!!
请大家帮忙。谢谢
我对adoq(批量更新方式打开)的记录集进行了一些操作,然后调用下面的函数,被删除的记录根本无法访问的。现在问题就是我要知道怎么访问!!!!!!!!!在线等
var
tpUM, tpM, tpD, tpN: String;
begin
with Adoq do
begin
First;
while not eof do
begin
if (rsUnmodified in RecordStatus) then tpUM := tpUM + Inttostr(RecNo) + '-';//'Unchanged record';
if (rsModified in RecordStatus) then tpM := tpM + Inttostr(RecNo) + '-';// 'Changed record';
if (rsDeleted in RecordStatus) then tpD := tpD + Inttostr(RecNo) + '-';// 'Deleted record';
if (rsNew in RecordStatus) then tpN := tpN + Inttostr(RecNo) + '-';// 'New record';
Next;
end;
end; showmessage('UM: ' +tpUM);
showmessage('M: ' +tpM);
showmessage('Del: '+tpD);
showmessage('New: '+tpN);
end;