Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to Stop Duplicates IDs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00572064
Message ID:
00572067
Vues:
32
What FoxPro version you're using? Is your table part of database or not? If yes, check Craig Bernston site to program of generating PK.

>This is my function I have a global variable (m._lstuid) which stores the last gen id and the next gen id is first compared with the stored id so as to avoid duplicates on a fast machine, but it still gens duplicates
>
>FUNCTION nextid
> m.zresult = m._lstuid
>
> DO WHILE m._lstuid = m.zresult
> m.zresult = logicfornextid()
>
> *** I had to put this to stop duplicates and I hate it
> *** WAIT "" TIMEOUT 0.001
> ENDDO
>
> m._lstuid = m.zresult
>
> RETURN m.zresult
>
>
>what am I doing wrong, why do I still get duplicate??????
>
>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform