Hello! There is a DB on ADO and Access. My task is to click on the button to filter the table by two fields at once: the value of the first field is entered into Edit1, the value of the 2nd is set via code. So far made the following code, but it does not work, swearing on arguments. I tried many options, but the error is the same.

ADOTable1->Filtered = false; ADOTable1->Filter = "Tip LIKE '"+Edit1->Text+"%' AND Rezultaty LIKE 'Не пройдена'"; ADOTable1->Filtered = true; 

Question: what is wrong with the arguments and how can this be corrected?

  • 1) where is the error? 2) display the request that gets access, you will see for yourself what is the reason, learn to debug. and yes, I would put a space before the Tip, since there so stupid filters are being made - strangeqargo
  • @strangeqargo if I did everything right, then the error is in LIKE, but I have no idea what is wrong with it - Holy Guacamole
  • @strangeqargo Undeifined symbol 'Rezultaty' - Holy Guacamole

1 answer 1

you confused MySQL / Postgres / other SQL and MS Access. The % sign does not make sense to Access. instead, you must use the * ( ? , # ) symbol http://www.techonthenet.com/access/queries/like.php

  • I changed it to the "*" sign, I'm still not looking. - Holy Guacamole
  • one
    Undeifined symbol 'Rezultaty' - Holy Guacamole