Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table not closing
Message
De
09/06/2016 12:59:53
 
 
À
08/06/2016 18:21:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01637157
Message ID:
01637184
Vues:
67
You have a lot of redundant code which only adds more error possibilities. This code will do exactly the same:
select 0
use forcepath('jobsweb.dbf',mwebpath) order TheNameOfTheActualTab 
* Set order to 1 depends on the creation order of the index tags, error prone!
if not used(thiswebfile)
   use forcepath('app1web.dbf', mwebpath) 
endif
select jobsweb
set order to TheNameOfTheActualTab 
seek mponum

...
...

use in select('jobsweb')
use in select('app1web')
>I have a weird, and persistent problem. A free table that doesn't want to close. Here is code:
>
>
>IF mwebenable	
>	thiswebfile=&mwebpath+'jobsweb.dbf'
>	thiswebfile1=&mwebpath+'applweb.dbf'
>	USE &thiswebfile1 IN 0
>	SELECT applweb
>	SET ORDER TO 1 
>	IF !USED('&thiswebfile')
>		USE &thiswebfile IN 0
>	ENDIF 
>	SELECT jobsweb
>	SET ORDER TO 1
>	SEEK mponum
>        ....
>        ....
>	SELECT applweb		
>	USE IN applweb
>	SELECT jobsweb
>	USE IN jobsweb
>ENDIF
>
>
>NO problems with 'applweb.bdf' at all, but run the prg more than once, and 'jobsweb.dbf' comes up unclosed. And I have tried all combos of Select and Use that I can think of.
>
>I can't use 'close tables all', as that will close the stuff in the DE, too, which is NOT wanted.
>
>What else can I do? ANY ideas will be greatly appreciated!
>
>Thanks!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform