AdvSearchList No values

Hello,

I have a DBAdvSearchList1 and a DBAdvSearchEdit2 on the form.
The DBAdvSearchList1 is filled in the development environment.
Now when I make a query at runtime, the list stays empty.
DBAdvSearchList1:

  • DataSource = ds_Projects
    Data source:
  • DataSet = my_DB

Query:
my_DB = kDBUstrich
kDBUstroke.SQL.Clear;
kDBUstrich.SQL.Add(sSQL_Search);
kDBUstroke.Open;

Now nothing is displayed in the DBAdvSearchList1.

On the form there is also a dbgrid. The values are displayed here.

Can you please give me a tip, I can't get it out after several attempts.

Thanks
Mike

Did you try to assign the datasource to TDBAdvSearchList AFTER you set the query?

I tried this without success:

f_dbm.myq_ustrich_DB.Active:= false;
f_DB_Projekt_einlesen(f_dbm.myq_ustrich_DB,'',2);
f_dbm.myq_ustrich_DB.Active:= true;
ds_Projects.DataSet:= f_dbm.myq_ustrich_DB;
DBAdvSearchList1.DataSource:= ds_Projects;
DBAdvSearchList1.Update;

Thanks for the help
Mike

Cannot be reproduced. When query updates, the TDBAdvSearchList is updated.
See test project.
Project1.zip (72.1 KB)

No matter what I try, it doesn't work.
I just did it now with advsearch edit. This works out.
Could it be because of Delphi 10.2?
However thank you for your help.

Did you try the test app? What are you doing different from the test app?

the test program works great.
I tried it with TFDQuery and with TMyQuery.
no difference.
What's weird, I have two VMs. Although I copied the project, something was displayed in the list on one computer but not on the other. Both have MySQL 5.7 and Delphi 10.2.
The query works, because the correct result is displayed in the DBGrid. Only the list doesn't change, even if I activate it. I'll try again in a new project. If that doesn't work here either, then I'll send you the project and the dump once. Thanks again for the help.