Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is BizObj.Save() changing and saving all records?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Why is BizObj.Save() changing and saving all records?
Divers
Thread ID:
00563704
Message ID:
00563704
Vues:
46
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform