Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open\Close all tables in directory
Message
De
15/06/2009 04:59:40
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
15/06/2009 03:23:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01405967
Message ID:
01405973
Vues:
49
UPDATE

See Stafans advice

Agnes
>Hi
>Help please
>
>On my form Load I have to open all tables in specific directory (That tables is free tables, not dbc) and on the form unload I have to close the tables.
>
>The following code open it but:
>1. If you run it twice the tables apeared duplicate with aliases as W15,W45 etc.
>2. 'If used... use in...' not close any table.
>
>
local ctbldir,ctabletoopen
>ctbldir= addbs('C:\DATA\')
>for i=1 to adir(lafiles, ctbldir+ "*.dbf")
>	ctabletoopen=ctbldir+ lafiles(i,1)
>	if used (ctabletoopen)
>		use in (ctabletoopen)
>	endif
>	if not used (ctabletoopen)
>		use (ctabletoopen) again in 0 shared
>	endif
>endfor
>
>Tnx
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform