Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accused of violations I'm not committing
Message
De
08/02/2005 17:09:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/02/2005 05:50:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00983795
Message ID:
00984940
Vues:
41
>Hi Dragan
>
>Yeah, I'm always chary of the dangers when using Alter Table. Of course I would have to ensure exclusive use of the table anyway. In case another user wished to create an ALLZONES record, at the same time, via its own form, where the NewID() function would come in to play, to get the next Zone ID.
>
>The main thing that's troubling me now, about this whole shibang, is that the Zone IDs I'm importing are welll beyond the range of the existing Zone records. e.g. the current highest incremental allocated Zone ID could be, say, 1100, whereas the import could introduce a zone ID of, say 9013 (as this does). Later, when and if NewID() reaches 9013, and happily allocates it, I'll get the uniqueness violation!

In my newid(), I'm calculating the max() of the id, but only once per key during the life of the app - I'm storing a list of visited keys in a property of _screen. But then, I may as well do that at the session level, so once per datasession, the first time a key is needed, I'd calculate it, just to avoid that nuissance.

Another reason for this (apart from the imports) may be that the table and the id.dbf may get out of sync. Had that before and it was a pain in down there to fix, so I'd rather lose some speed than lose sleep.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform