Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting records in view causes problems in business object
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Deleting records in view causes problems in business object
Miscellaneous
Thread ID:
00285830
Message ID:
00285830
Views:
64
OK, now Kevin promised me there would be a lot of love in here...

We are developing an app that has any number of tasks for a process. These tasks must occur in a certain order. We want to use a listbox with mover bars to display and edit the task data. Not a mover, the task list is not to be validated.

On the third tab of a cBizObjMaintenanceForm I have a cListBox object. I have a child business object on that page that contains a parameterized view limiting the data to the chosen master record (process). An index is generated to get them in order.

If we use the mover bars, we have to use either 0 or 1 as a rowsourcetype in the listbox. In the postrequery event of the biz object, we add items to the listbox from the view. Everything works great. The items are there, in order, limited to the proper process. We can move them around.

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.

You have to excuse an old procedural programmer. This is a five minute job if I could write directly to the table. How can I flush the view, recreate it, and get this saved (legally).

Also, what is the "proper" way to tell the object I have changed something in the view so it even runs the save method? Currently inserting a bogus record, but I'm sure that's not the right answer.

Thanks for your help!
Regards,

Bill Dimes

"There's never enough time to do it right the first time, but there's always time to do it over"
Next
Reply
Map
View

Click here to load this message in the networking platform