I need to continuosly check a table record to find whether a column be modified from outside.
As far as I conceive I have two chanches
1) first locate and then loop refresh
PrMod.Locate('POSTAZIONE',isKeyPrmod,[]);
while (PrMod.FieldByName('COMANDO').AsString='X') do begin
PrMod.Refresh;
Application.ProcessMessages;
Sleep(20);
end;
2) Continuosly locate
repeat
PrMod.Locate('POSTAZIONE',isKeyPrmod,[]);
Application.ProcessMessages;
Sleep(20);
until (PrMod.FieldByName('COMANDO').AsString='X');
which of the two less charges my Server ?
As far as I conceive I have two chanches
1) first locate and then loop refresh
PrMod.Locate('POSTAZIONE',isKeyPrmod,[]);
while (PrMod.FieldByName('COMANDO').AsString='X') do begin
PrMod.Refresh;
Application.ProcessMessages;
Sleep(20);
end;
2) Continuosly locate
repeat
PrMod.Locate('POSTAZIONE',isKeyPrmod,[]);
Application.ProcessMessages;
Sleep(20);
until (PrMod.FieldByName('COMANDO').AsString='X');
which of the two less charges my Server ?