Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TABLEUPDATE(2,.T.) leaves records that are not updated
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00500580
Message ID:
00500637
Views:
26
Hi Peter,
>>Is your view updateable ?
>>Have u clicked on Send SQL updates in the view designer ?
>>I did not understand what u are trying to do exactly.
>>
>>Reply me so I can help u.
>
>Yes to all of the above- in fact it's all SQL pass-through.
>
>The problem seems to be that most of the records are updated, but one or more are not. This in turn generates an error.
>
>Now this could be because of a primary key violation or some such thing, but I check for that or any error for that matter, and the error routine does not fire.

Using TableUpdate(2) is supposed to update all possible and ignore errors. After the TableUpdate() if not all records were committed, you cannot change buffering because you still have uncommitted changes in the buffer. You can check for this with GetNetModified(). If you have uncommitted changes, you can TableRevert() them. Or try to fix the error that prevented the change. I had trouble with the cErrorArray parameter in VFP5 and never tried it again in VFP6, so I loop through using GetNextModified() and a single record TableUpdate().

HTH,
Bill Armbrecht
VFP MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform