filter delphi records

0

I am working on a project in delphi xe6 and ADO and MS ACCESS components as a base of tados.

When I write a letter in edit1 for example the letter 'a' I see this error "incorrect arguments, outside the allowed range or in conflict with others". The relevant code is this:

DataSource1.DataSet.Close;
DataSource1.DataSet.Filter:= 'nombre like' + quotedstr(Edit1.Text + '%');
DataSource1.DataSet.Open;
DataSource1.DataSet.Filtered := True;
    
asked by pablo 17.08.2018 в 22:36
source

1 answer

0

I see two possible problems - After Like leaves a blank space that separates it from the quotes    'name like' + quotedstr (Edit1.Text + '%');

  • the quoteStr includes double quotes and you may need a single quote, so you can substitute Quotestr for a single quote, remembering that if you go next to another quote you put two single quotes '', which is not the same as a double "
answered by 18.11.2018 в 10:43