Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I misusing TableUpdate()?
Message
 
À
04/09/1999 10:26:26
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:
00262696
Vues:
30
>>I have a remote view of a VFP DBC table. I inserted several records from arrays, etc. into the view. Now I issue tableupdate() at the click of a form button and nothing happens - no records are written to the table.
>>
>>Am I misusing the function because I didn't read from the table into the view first? What's the best way for getting the view info into the table?
>
>NO, you don't need to REQUERY the view before updating from it. Your problem lies elsewhere. In addition to Jim's advice, check to make sure that the view is set to updatable, a key field is specified, and the proper fields are marked as updatable.



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
tableupdate(2,.t.,'CustUpdate')
VFP is trying to append/insert, which would violate uniqueness. I just want to replace the record. In the view's properties, I (via GUI) tried update via SQL update and update via SQL delete/insert - neither worked.

What did I miss this time?

Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform