I have an ADOTable with 3 columns 'ID', 'Number' and 'Used'. The table contains some pre-generated numbers. When I use a number I just set the 'USED' to 1 and then I filter the table to get only the unused numbers.
Now the small problem: say I pull a number and set the 'USED' to 1. I see the column updated in Access, if I try to pull different number with Delphi it gives me the same, so I think the ADO table has not been refreshed. I tried to use refresh
but it did not work. The only way I can make it work is to use Active := false
and then Active := true
. I think there should be more elegant way to do it. Any idea?