Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I misusing TableUpdate()?
Message
De
12/09/1999 22:06:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00261437
Message ID:
00263856
Vues:
36
>>>>>All of the fields are set in the view as updatable (even the primary key field), and when creating a new record things now insert kind of OK. However, if I edit a record, VFPODBC complains "uniqueness of primary key violated" when I know it hasn't been. It's like although I am doing a
>>>>
>
>>have you chekced the value of the primary keyfield in the view just beforethe TABELUPDATE()?
>
>The keyfield value in the view is the same as what's in the originating VFP table. My (feeble) understanding of tableupdate() was that it would use the index value to locate the matching table record and then overwrite that with the new data. What's weird is that when I changed my "keyfield" from a primary index to a regular index, the following code basically inserts a new record is exactly like the one I was editing. All I get is inserts, no updates.
>


VFP keeps track of what are new and what are current records (to decide whether to INSERT or UPDATE) with the Fieldstate of the view. When checking GETFLDSTATE-1) on oyur view before tableupdating, does it show 2s or 4s?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform