var tbl1:TTable;
begin
tbl1.open;
if tbl1.locate('keyid','keyvalue',[]) then
begin
tbl1.edit;
tbl1.fieldbyname('ssss').value := xxxx;
tbl1.post;
end
else
begin
tbl1.append;
....
end;
var tbl1:TTable;
begin
tbl1.open;
if not tbl1.locate('keyid','keyvalue',[]) then tbl1.append;
tbl1.edit;
tbl1.fieldbyname('ssss').value := xxxx;
tbl1.post;
end;