Locate not working ?
Posted: Tue 29 May 2012 08:02
I'm sure it is obvious but I can't see it.
I have tried both integer and string and neither work.
MemId is MediumInt of length 9
Any Suggestions ?
Code: Select all
procedure TfMain.Button3Click(Sender: TObject);
var
sMemId:String;
begin
with dm.tblSubs do begin
first;
while not eof do begin
sMemId:=FieldByName('MemId').asString;
if dm.tblMembers.Locate('MemId','sMemId',[])then begin
Edit;
FieldByName('MemName').asString:=dm.tblMembersMEMNAME.AsString;
Post;
end;
next;
end;
end;
end;MemId is MediumInt of length 9
Any Suggestions ?