I am trying to execute a simple select*from statement with delphi but cannot get it to work. Please assist.
With Data.personel Do
Begin
Active:=False;
Sql.Text:='Select*From personel where (name like ''%'+Combobox1.Text+'%'') and (surname like ''%'+Combobox2.Text+'%'') and (id_number like ''%'+Combobox3.Text+'%'') sort by '+sortfield1+','+sortfield2+','+sortfield3;
Active:=True;
End;
Sortfield1,2,3 are just variables that change when the sort comboboxes are changed.
I keep getting the same error, that there is a missing operator. I cannot figure out what is wrong. any assistance would be great, thanks.