Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement