Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UsDeleted doesn't recognize

Status
Not open for further replies.

beltijs

Programmer
Sep 11, 2003
25
AR
hi!
I've this code for a clientdataset

myclientdataset.first
while not myclientdataset.eof do
begin
if myclientdataset.UpdateStatus = usInserted then
{do something}
if myclientdataset.UpdateStatus = usModified then
{do something}
if myclientdataset.UpdateStatus = usDeleted then
{do something}
myclientdataset.next;
end;
myclientdataset.applyupdates;

It works fine for Inserted and Modified record, but it doesn't enter in the deleted block. The applyupdated is working fine in all tree cases, the deleted records are applied in the database.

Merry Christmas!!!!

Paula
 
By default deleted values are hidden. Show which records you want using the following code.


with myclientdataset do
begin
StatusFilter:=[usModified, usInserted, usDeleted];
try
while not eof do
begin
...
...
...
end;
finally
StatusFilter:=[];
end;
end;


Also beware usUpdated. If a record is inserted, a post is done Post, and then modified if will hve an UpdateStatus of usModified, not usInserted.

Have fun
Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top