Information générale
Catégorie:
Codage, syntaxe et commandes
>Let's face it. NO system is 100% foolproof. That's why I check for existing values & trap errors.
I thought that VFP already had a SYS function that returned a ten-character unique ID based on the time. From help, SYS(2015):
Returns a unique 10-character procedure name that begins with an underscore followed by a combination of letters and numbers.
Syntax
SYS(2015)
Returns
Character
Remarks
SYS(2015) can be used to create unique procedure or function names.
The name that SYS(2015) returns is created from the system date and system time. Calling SYS(2015) more than once during the same millisecond interval will return a unique character string.
This function has worked wonderfully for me for generating unique values for key fields and the like.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement