Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting records in view causes problems in business obj
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00285830
Message ID:
00285846
Views:
19
>
>Now, saving them. We need to get the data back into the view and get it saved. We tried to DELETE ALL in the view and insert all of the data back into the view. Should work, but when the business object saves the view, it checks for appended records, and if they exist, it marks all primary keys as changed. This call seems to cause all of the deleted records to resurface, with little bar characters in them and zero in the numeric fields. Blows the uniqueness of the index, crashes.

This is a shot in the dark, but instead of the DELETE ALL try calling the bizobj that is responsible for the view Delete() method and pass it a .T.

Eg. oBizObj.Delete(.T.)

Then loop through each of the new records like:

oBizObj.New()
REPLACE table.field WITH newvalue

Assuming you're using table buffering, add a oBizObj.Save() call at the end.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform