|
| [WD20] Large Table Problem/Bug |
| Iniciado por guest, 03,nov. 2015 19:13 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 03,noviembre 2015 - 19:13 |
Link to a small project I made to show the bug so you can see for yourself.
I have a table with 15,000 records. Each record has a checkbox at the beginning called 'Tagged'. The end user can tag as many records as they want and then hit a 'Show Only Tagged' button. After making sure at least one record is tagged I then loop through the table and delete all rows that aren't tagged. This works perfectly fine if I tag the first 5 plants, but when I tag plants further down the table it runs really slow and bugs out.
I am pretty sure this is another PCSoft bug. Thoughts? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,noviembre 2015 - 19:54 |
Hi Curtis,
type of tool used? version of the tool ? Type of table ? Code used to delete?
Most often with deletion loops, this kind of problem comes from the loop being run in the wrong direction (beginning to end).
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,noviembre 2015 - 20:06 |
Curtis,
I had a quick look and you need to supress the redisplay of the table during the delete loop. Otherwise is will redraw the entire tale every time you delete one row.
TABLE_Test..DisplayEnabled = False your code TABLE_Test..DisplayEnabled = True
Then it runs "10 times faster"  |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,noviembre 2015 - 20:50 |
Fabrice - Sorry, I thought linking to the sample project would be enough info. Arie - Thanks that should work! Again, I probably should have thought of that. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,noviembre 2015 - 21:03 |
Well it is enough, if one has the time to download, unzip, install, open and check for himself...
Foer everybody else, it's much faster if YOU take the time to write it down.
Best regards |
| |
| |
| | | |
|
| | | | |
| | |
|