Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to keep track of opened cursors
Message
De
09/11/2001 11:28:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
How to keep track of opened cursors
Divers
Thread ID:
00579695
Message ID:
00579695
Vues:
68
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...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform