PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 26 → table control cached??
table control cached??
Débuté par Bill Quinn, 20 juin 2022 14:13 - 1 réponse
Posté le 20 juin 2022 - 14:13
I need some help with a weird problem. Using WD27...I have 2 database tables: codes & productType. The productType has a field that indicates if it is inactive.

I have a table control, populated via a query and loaded into memory. The query is a simple hand-coded select from codes with a join to productType and a "where inactive = 0". The table controls works fine until I change a productType's inactive status. The table control (which is not open when I change the productType) does not recognize the change and shows exactly the same data as if it were cached. If I close and reopen the program, the table control now recognizes the changed in inactive status. I added a HExecuteSQLQuery to the table control's global area using the query's sql and it always shows the correct data even when the table control does not.

Any thoughts on why the table control isn't up-to-date?
Posté le 21 juin 2022 - 19:02
The answer is in the question :-)

"....I have a table control, populated via a query and loaded into memory...."

And that means that as long as you do NOT RE-EXECUTE the query, your tablecontent will not change...

So after changing your record, you either by code change it in the table, or much better, you do a tabledisplay with the reexecutequery parameter