[Lazarus] use of the function Locate
Héctor Fiandor
hfiandor at ceniai.inf.cu
Sat Aug 8 15:30:45 CEST 2015
Dear coleagues:
I have used the function Locate many times, but now I have a question:
I have this part of a program:
DBEcodNeg.Text:=anadecero(DBEcodNeg.Text,2);
fdm.tNegocios.Locate('codCliente',DBEcodNeg.Text,[]);
fdm.ti_medicos2.Edit;
fdm.ti_medicos2.FieldByName('codCliente').AsString:=fdm.tNegocios.FieldByNam
e('codCliente').AsString;
if the operator has a mistake and write in the DBEdit control a number not
included previously in the table tNegocios the function Locate drawback the
last record of the table.
How can I know if the number asked is in the Table?
Thanks in advance,
Ing. Héctor Fiandor
hfiandor at ceniai.inf.cu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150808/392b43cb/attachment-0002.html>
More information about the Lazarus
mailing list