Cant loop trhough database??
Hi all,
I run a loop through my database, to look for a value. When the value is
found I need to change it to something else. The problem is when I do the
Edit-Change-Post routine, the loop exits and doesnt run any further. Can
anyone suggest anything?
Cheers fuzzyd...@yahoo.com
dmMain.tbCandidate.DisableControls;
dmMain.tbCandidate.First;
while not dmMain.tbCandidate.Eof do
begin
vRecordDate := dmMain.tbCandidate['LastUpdated'];
if vLimit3Set = true then
begin
if ((Date - vRecordDate) >= vLimit3) AND
(dmMain.tbCandidate['CurrentStatus'] <> 2) then
begin
dmMain.tbCandidate.Edit;
dmMain.tbCandidate['Status'] := 3;
dmMain.tbCandidate['Mode'] := 4;
dmMain.tbCandidate.Post;
end;
end;
dmMain.tbCandidate.Next;
end;
dmMain.tbCandidate.EnableControls;