Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to generate key field values
Message
 
À
23/07/1998 10:07:03
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00120429
Message ID:
00120826
Vues:
18
I have been using a controversial little piece of code. I usually place it in both, the database and a procedure file so that I cover DBC based tables in an automatic way. Here goes the code

func uCode
return int(val(sys(1) + seconds() * 1000) + recno())

The controversy arises from the fact that I refuse do any checks on the univocity of the returned value. I know Murphy's law but I have been using this function, or some vaiation according to the xCase dialect I was using at the time, for over 10 years without having ever a problem.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform