Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to auto close main table after sql cursor selected
Message
 
To
12/10/2016 04:00:31
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01641843
Message ID:
01641853
Views:
54
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform