>>Hi
>>
>>I m not looking for a way to see the cursors/tables.
>>
>>I dont want to open tables again and again, For example if I have a queries form with 'preview' command buttun, the query run on the opend tables and in the procedure I created cursors, now the user want to run the query again on other ids range, I have to close all the cursors procedure but I don't want to close the tables and I dont want to close the other opend cursor (example, I have a cursor for list box).
>>
>>This example show you the problem principle.
>>
>>I dont want to open the tables every form, I fust use with set order to my indexes and to close only the temp cursors (exept my tables and some cursors).
>
>Actually, Hilmar's suggestion was right on the spot. I once had a situation like that (though I regularly use private datasessions), and the trick out of it was to get the aused() array twice: when starting and on exit. So if you have a process of any sort that creates its own cursors, and you want only those closed - use aused() before the process, and again after the process. Then go through the second array, and if any alias listed in it is not in the first array, close it. If it is in the first array, it was open before the process, so skip that one.
So, this is how this
Class to close any cursors created after it was instantiated FAQ #31943 idea was born in :)
If it's not broken, fix it until it is.
My Blog