Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement