Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
P-views and grids
Message
 
 
To
21/10/1998 15:02:37
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00148953
Message ID:
00149121
Views:
22
Nancy,

I've never had tableupdate() return .f. in a normal data update/add mode. The only time I ever really worry about it's return is in the case of record Delete where the RI rules come back preventing the deletion and I inform the user that child records prevent the removal of this item and tablerevert(), but that kind of delete code only runs against row buffered parent tables not child p-views.

>3. I knew there was a problem because TABLEUPDATE( 0, .T., 'lvw_wlevel') returned .F. on just a few records. And only when I was creating more than 30 or so.

I always use 1 as the first parameter.

>4. I added some code and now the code is well-behaved. But it could be accidental. What I've done is SCATTER NAME aErrors[] any record that fails the tableupdate and revert the record. Then, when I'm done with the scan loop in which I add the records, I check the array. If it has any "bad" record objects, I APPEND BLANK into the view, and GATHER FROM the object. And this works. But I distrust it < shrug >.

*shiver* that's the kind of code that always comes back to bite me, I usually try to figure out the real root problem. Do you have table/field/RI rules that are causing tableupdate() to choke on some records? What's different about the rejected records vs accepted records?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform