Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to release a cursor
Message
De
25/08/2005 07:04:09
 
 
À
25/08/2005 05:34:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01043728
Message ID:
01043749
Vues:
11
>Dear Experts
>
>I get some data using following commands
>
>SELECT CODE,DESC FROM MASTER;
>WHERE LEN(ALLTRIM(STR(CODE)))=6 .AND. DESC LIKE SNAME;
>ORDER BY DESC;
>INTO cursor TEST15
><pre>
>
>But in other forms if I use above commands then it show following error message
><pre>
>Cursor name is already in use
>
>
>How to release cursor name to get rid of above error message in other form?
>
>What should I write on unload event of form to release curosr?
>
>Please help

Tariq

I had the same problem, and used SYS(3) to create an unique name for it. Example below:
* Need make uniquely-named copy of cursor in case another
* invokation of the form wants to use it as well
* ______________________________________________
lcTestCsr =  "csr" + SYS(3)     && gives you unique cursor name
SELECT CODE,DESC FROM MASTER;
 WHERE LEN(ALLTRIM(STR(CODE)))=6 .AND. DESC LIKE SNAME;
 ORDER BY DESC;
 INTO cursor lcTestCsr 

Select DBF( lcTestCsr)
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform