Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Am I misusing TableUpdate()?
Message
From
12/09/1999 22:06:24
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00261437
Message ID:
00263856
Views:
35
>>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform