Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a code sequence
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01046401
Message ID:
01046455
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
> There will be 5 users sharing the table
> I think there will be no risk of a repeated code, will it ?

It does not have anything to do with "repeating". The problem is hitting the "save-button" at the same time. And for that two users would be enough. However with the number of users chances rise.

Everyhing might be OK for the next five years. Suddenly You have a field that should be primary key twice. You will not be able to remember in five Years, how this could possibly happen. If You go for this approach You definitely *do* have a timebomb there.

On the other hand this is a task You might have in almost any table You will ever use (if You use primary keys) and so writing a secure Procedure *once*, will save You a lot of sleepless nights.

You really can take my NewId()-function it might take a few minutes to understand what's going on and to comment out some of the lines that are not needed. Then You're done and never have to think of that problem again.
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform