I have a form that displays the files in a certain folder, and a command button that executes some code. After the code is executed, the file can be deleted, so I use the ERASE command. All works well, the code does its thing with the file, and the file itself gets deleted. I want the list of files to be refreshed, but even though I do a CurrForm.UPDATE, the deleted file just won't go away :-k
Does anybody have any tips for me? I don't care if I need to approach this a different way, but I need that list of files to refresh when I delete a file.
Thanks
0
Comments
http://www.mibuso.com/forum/viewtopic.php?t=1672
I'm not sure how you would implement this in your form.... I'd begin with something like
That link gave me the information I needed. I ended up having to add a bogus path filter both in my OnOpenForm and at the end of the button code.
So where I had this:
I changed it to: and that works! Thanks a lot, that really helped me out =D>
RIS Plus, LLC
You forced the change of record set by applying different filter and then reapplying previous one (again new one for record set).
For regular tables also changes (modify, delete, insert) are managed through the same record-set, so it is aware that it needs to refresh.
It would be interesting to explore and compare behavior of regular tables, when someone else deletes a record behind (e.g. in SQL QA). As far as I remember it also behaves strange.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
If it was hard to write, it should be hard to understand."
I was thinking along the same lines Robert, that's the only way it makes sense. The thing that gets me though is that Navision gives us a familiar way to interact with 'outside objects', but they don't follow through. The way I see it is that if they implement the file structure as a Navision table, they should also make it behave like a Navision table.
This is not a knock on Navision, but it would have been nice to have this information in F1 help. I am happy to at least have the virtual file table, since it gives my customer a familiar interface.
RIS Plus, LLC
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
RIS Plus, LLC