Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to auto close main table after sql cursor selected
Message
 
À
12/10/2016 04:00:31
Hee Lim Wang
Fantasy Software Enterprise
Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01641843
Message ID:
01641853
Vues:
55
>select * from mytable into cursor tmp where.......
>but mytable.dbf still open after tmp cursor formed
>is there any way to close mytable automatically after selected ?

I am not sure I would brave enough to use it, but this seems to do the trick
select * from mytable into cursor tmp where somCondition nofilter having closeSource('mytable')


function closeSource(tcAlias as String) as Boolean
	use in select(tcAlias)
	return .t.
endfunc
(This will be called a gazillion times for doing one thing, so I would not recommend it as it offers very little in return, but it does what you want :)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform