Greeting all
Thank you for all the help. The searched, entries, updates and so forth work perfectly now.
Now i need to Delete some records in a normal DBF file searching TWO strings.
This is what I did :
(DM1 is DATAMODULE]
dbf:= dm1.Company;
Found := False;
DBF.First;
dbf.Open;
begin
while not DBF.Eof do
begin
if (dbf.FieldByName('Boxnum').AsString= EDIT1.TEXT) AND
(dbf.fieldbyname('Branch').AsString=EDIT2.text) then
begin
dbf.Edit;
found:=true;
dbf.Delete;
end;
dbf.Next;
end;
It finds the records perfectly, but I get the "RECORD LOCKED" error in each instance.
I can append, Read, write and modify to that database with no trouble, its just the delete that gives the error.
As usual, I must be something small I am missing.
Much thanks for your patience.
-Peter