asked on
SQL.Clear;
SQL.Add('SELECT STUDENTID,STUDENTCONTACT FROM STUDENTTABLE ST JOIN STUDENTPROFILE SP ON ST.STUDENTID = SP.STUDENTID');
SQL.Add('WHERE STUDENTNAME = :studentname);
ParambyName('studentname').AsString := studentname.text;
Open;
try
if (not EOF) then
begin
studentID.text:= inttostr(FieldByName('STUDENTID').AsInteger);
studentContact.text := FieldByName('STUDENTCONTACT').ASSTRING;
end;