Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique file names
Message
 
À
10/09/1998 12:06:41
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00135083
Message ID:
00135120
Vues:
10
>>With VFP and Win9x or NT you could drop the substr part (and think dropping is really better) and even add a one-two char station identifier to make it always unique.
*table stations exist
>>* structure just (online l)
>>* prg entry
>>use stations
>>do while !(seek(.f.,"stations","online") and rlock("stations"))
>>  insert into stations values (.f.)
>>enddo
>>
>>* cUniqFile = "T"+padl(recno("stations"),3,"0")+sys(2015)+".tmp"
Cetin
>Ooops. Extra careless code:
replace online with .t.
>*after enddo
>*at exit of app
>replace online with .f. in "stations"
>unlock in "stations"
Hi Cetin,

Only one problem with this. It assumes that the drive supports long filenames, which may or may not be the case depending on the OS. For example, I don't believe that Netware 3.1x has long filename support. This may have been the reason that 6.0 suggests the SUBSTR() business.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform