Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Urget !! How to avoid this error message in view
Message
De
06/09/2002 22:46:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/09/2002 16:06:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00697751
Message ID:
00697846
Vues:
16
>hello all
>
>I have a grid based on a view and i get this error message when i updated a duplicate record,
>
>Warning The key defined by the keyfield property for table mydbc!table1 is not unique.
>
>Here is a sample data , key field is SSN
>
>Table1
>SSN
>123456789
>123456789
>987654321
>323552345
>
>Second record is a complete duplicate,so users selects it to delete.i just issue =tableupdate(.t.)
>
>but i get this error message.how to avoid this,any workarounds ???
>
>Txs for any help.

Seems like your table got the data before this was assigned as a key, or somehow passed the validation. It shouldn't let you have this in the first place, but there could be some setting I never used which would allow this.

What's happening is that this key is already wrong, but VFP won't complain unless you try to update the record, and deletion counts an update (it writes a "*" into the invisible field which is on the last byte before the first field in each record). You'd have to replace the key with some different value (in case of SSNs, there's a range of impossible values, use one of those) before updating the record, so the keys would be different and the DBC would allow the update.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform