Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Key Violation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00245748
Message ID:
00245778
Vues:
19
>>< SNIP >
>>
>>>You can also change the key value before deleteing a record. FOr example a numeric key could be made negative when the record is deleted.
>>>
>>
>>Changing the key works, but making it negative doesn't, for the simple reason that if you ever recycle a key twice, there will be two identical negative values...
>>
>>>The index could be made a composite key that includes the deleted status as part of the key.
>>
>>Same problem.
>
>Ed,
>I guess I didn't think those options all the way through. I've always used either the DELETED OFF option or surrogate primary keys.

It helps if you try them and get bit once or twice... < g > The critical message is not to recycle primary keys. Surrogate keys make this easy, and once you give up on the idea that they're needed for sequencing, generating them safely becomes easier.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform