Searching pada Delphi

Referensi PBO 1 (Delphi)
Searching: findnearest // tidak sama persis tbbarang.indexname:=’namabrg’; ada:=tbbarang.findnearest([edcari.text]) Searching: findkey // sama persis tbbarang.indexname:=’namabrg’; ada:=tbbarang.findkey([edcari.text]) if ada then begin tbbarang.edit; tbbarang[‘stock’]:=tbbarang.text; end; Searching majemuk: var caritgl:tdate; begin tbbeli.indexname:=’kdbrgtgl’; // index majemuk try begin caritgl:=strtodate(edtgl.text); tbbeli.findkey([edkodebrg.text, caritgl]); end except tbbeli.findkey([edkodebrg.text]); end; end; delete tabel: tbtemp.first; while not tbtemp.eof do begin tbtemp.delete; end; Append tabel; begin for i=1 to 10 do begin tbtemp.append; tbtemp[‘kodebrg’]:=’ ‘;; end; end;

Share this

Leave a Reply

Your email address will not be published.