program non;
var
tc:tclientdataset;
i:integer;
begin
i:=0;
tc:=tclientdataset.create(nil);
tc.data :=hosxp_getdataset('select hn,public_note from ptnote where ((public_note like"") or (public_note is null)) ');
while not tc.eof do
begin
i:= i+1;
tc.edit;
tc.fieldbyname('public_note').asstring:='Y';
tc.post;
showdebugtext('ÅӴѺ·Õè '+inttostr(i)+' HN = '+tc.fieldbyname('hn').asstring+' >>>>>>>> Public_note change result '+tc.fieldbyname('public_note').asstring+' OK');
tc.next
end;
if tc.changecount>0 then
hosxp_updatedelta(tc.delta,'select hn,public_note from ptnote where ((public_note like"") or (public_note is null)) ');
showdebugtext('...........................................................................');
showdebugtext('ÃÇÁ·Ñé§ÊÔé¹ '+inttostr(tc.recordcount)+' ÃÒ¡ÒÃ');
tc.free;
showmessage('Process Done');
end.