Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is BizObj.Save() changing and saving all records?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Why is BizObj.Save() changing and saving all records?
Miscellaneous
Thread ID:
00563704
Message ID:
00563704
Views:
44
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
Next
Reply
Map
View

Click here to load this message in the networking platform