Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close Database All missed some tables
Message
De
02/08/2002 08:32:09
 
 
À
02/08/2002 00:14:41
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00684841
Message ID:
00685366
Vues:
15
If you are running VFP 7.0 you can use code like this:
LOCAL laSess(1), i
laSess = .null.
FOR i = 1 TO ASESSIONS(laSess)
	SET DATASESSION TO laSess(i)
	CLOSE DATABASES all
ENDFOR
Glenn
>>>hello everybody,
>>>
>>>I need to implement a function in a system, the function needs to close all database before working. I used "close data all", but when I check with DBUsed(MyDBC) it still returns true.
>>>
>>>I checked with the data session window and found that some tables are still in a session "unknown(2)", it's kinda trouble for me to find out where did the system put these tables in the unknown session. What should I do to really close all database, including those in the unknown session? or must I modify the current code to prevent them from falling into it?
>>>
>>>Thanks a lot!
>>>Jimi
>>
>>Perhaps the project is keeping the DB open. 'Tis not necessary to close the entire project (it is very slow to re-open a project, if you use source control); just select the database and click on the "Close" button on the project.
>>
>>HTH, Hilmar.
>
>
>Hello Hilmar,
>
>But I need to do it in runtime, if i run the project in vfp, i can open the data session window and click the tables to close, then it works ok. but how can i really close all data when my client is running the exe?
>
>Jimi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform