Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is BizObj.Save() changing and saving all records?
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00563704
Message ID:
00564274
Views:
14
I have stepped through this innumerable times, and cannot see where the problem is. The lcAlias is always the child view throughout the save(), as it should be, so that is not the problem. Again if anyone has any suggestions as to what could possibly be causing this, I would REALLY appreciate it.

-Justin

>Hello,
>
>I am using a BizObj which is based on a view which is based on a table - the view pulls up all records where iBomID = a certain number and lActive = .T. Usually the view will pull up less than 50 records off the parent table which contains about 1500 records, depending on the iBomId.
>
>In the event which uses this BizObj, I have the following code:
>
>LOCATE FOR EVALUATE(lcAlias + '.iBomId') = vp_ibomid AND ;
> EVALUATE(lcAlias + '.lActive') = .T.
>
>DO WHILE FOUND(lcAlias)
>
> Replace lActive With .F.
>
> * Get rules object and turn off rules.
> loRulesObj = ThisForm.OffDetByBomBizObj.GetRulesObj()
> llCkRules = loRulesObj.lAutoCallRules
> loRulesObj.lAutoCallRules = .F.
>
> *Save
> llRetVal = IIF(ThisForm.OffDetByBomBizObj.Save(.F., .F.) ;
> = FILE_OK, .T., .F.)
>
> * Reset buffering and rules obj.
> loRulesObj.lAutoCallRules = llCkRules
>
> CONTINUE
>
>ENDDO
>
>For whatever reason, this replaces lActive with .F. for all records on the parent table. I have tried various configurations with the parameters passed, the buffering (currently set to 3 - optimistic row), and toggling the rules on or off. Each configuration either updates everything or updates nothing.
>
>If anyone out there can help, please let me know, as my sanity is at stake!
>
>TIA,
>
>-Justin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform