Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shorter than sys(2015)
Message
De
04/02/2015 11:55:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01614860
Message ID:
01614884
Vues:
69
J'aime (1)
it seems to happen: http://www.west-wind.com/wwThreads/default.asp?Thread=4941C3NXN&MsgId=4941C3NXO

we use this function:
function Sys2015
local result
result = Sys(2015)
do while m.result == Sys(2015)
enddo
return m.result
endfunc
>>SYS(2015) is not very good uniqe (for example for temp files on a multiuser scenario its not fast enough, I had crashes for non unique filles)
>>
>>This is by the way it is created.
>>
>>Lutz
>
>Are you sure you are not confused with sys(3)? I never had a problem with uniqueness of sys(2015), I just did a crude test creating a million records in a cursor, it took 0.786 seconds (1272 records every millisecond) and got zero collision.
>
>
>CREATE CURSOR c_test (PK I AUTOINC, VALUE C(10))
>
>lnStart			= SECONDS()
>FOR i = 1 TO 1000000
>	INSERT INTO c_test (value) VALUES (SYS(2015))
>NEXT i
>
>? SECONDS() - lnStart
>
>SELECT value, COUNT(*) cnt GROUP BY 1 ORDER BY 2 DESC FROM c_test HAVING cnt > 1
>
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform