Hi,
I want to keep track of the cursors currently opened in my working environment. Problem is, some of the were built using a query:
SELECT * FROM myTable INTO CURSOR crsMyCursor
I tried the following code to list all my opened cursors:
<CODE>LOCAL lnPos, lnFile
lnFile = FCREATE("C:\debug_cursors.txt")
IF lnFile = -1 THEN
RETURN
ENDIF
lnPos = 1
DO WHILE USED(lnPos)
FWRITE(lnFile, ALIAS(lnPos) + CHR(13) + CHR(10))
lnPos = lnPos + 1
ENDDO
FCLOSE(lnFile)</CODE>
It's fairly simple but it only lists the opened tables in my environment (the ones I opened using the 'USE' keyword). I have also taken a look at all the 'DISPLAY ...' and 'LIST ...' possibilities but none of them do what I want.
So, how can I quickly list all of the opened cursors in a specified working session?
Thanks in advance, Stephane.
P.S. In the future, I will probably create my cursors using a method that will store the names of all the opened cursors in an array. But for now, since the application is almost fully completed, I'd like another solution...