Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to keep track of opened cursors
Message
From
09/11/2001 11:28:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to keep track of opened cursors
Miscellaneous
Thread ID:
00579695
Message ID:
00579695
Views:
69
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...
Next
Reply
Map
View

Click here to load this message in the networking platform