Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique file names
Message
De
10/09/1998 12:03:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/09/1998 11:53:17
Jeff Carolus
Economic Opportunity Corp.
Saint Joseph, Missouri, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00135083
Message ID:
00135109
Vues:
11
>>>I have a form where I return the results of queries into several temporary files. I am using the sys(3) function to get the names for these. After upgrading to VisFox 6 I have several users who are having problems with duplicate file names. I have even put timing loops in between the sys(3) statements with no luck. Anyone have any suggestions how to get the unique file name function to return unique file names?
>>
>>Hi Jeff,
>>
>>The docs on SYS(3) say that on fast machines it may not work. It recommends "Use SUBSTR(SYS(2015), 3, 10) to create unique, legal eight character file name."
>>
>>hth,
>
>
>Thanks a bunch, guess I'm used to my old FoxBase days on 8086's
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform