Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing ALL Tables and DataBases
Message
De
24/08/2001 18:22:47
 
 
À
24/08/2001 17:26:33
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00548975
Message ID:
00549041
Vues:
16
>>>>>Try the USE command by itself. This should hopefully close any table that is opened. Let me know if it works.
>>>>>
>>>>
>>>>Ravi,
>>>>This will close any table open in the current work area. It does not affect other work areas nor does it affect other datasessions.
>>>
>>>Thanks Larry. Would I use CLOSE DATEBASE ALL? What if I did not have a database, but just free tables?
>>>
>>>Appreciate your advice.
>>>
>>>- Ravi
>>
>>I am new to VFP but in other xbase languages we had something like this
>>
>>nArea = select(0) && Get the next available work area number
>>for i = 1 to (nArea -1) && -1 because we did not open anything in nArea
>> select(i) && select that workarea
>> use && Close the workarea
>>endfor
>>
>>Hope this helps you think of something you could use.
>
>Thanks so much Cecil. apprciate your input.
>
>- Ravi

Just checked we have alias(x) which will return the name for the file open
in workarea x so code would be something like this
local i, x, lStop, cFile
lStop = .F.
x = 1
do while !lStop
if !empty(alias(x))
cFile = alias(x)
select (cFile)
use
else
lStop = .T.
endif
enddo
*!clf!* this should close all current workareas if they were opened
*!clf!* sequentially...No blank check but you could try this...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform