Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need guidance on transactions
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00659716
Message ID:
00660848
Views:
13
>>In respect to style I hate nesting ifs !!!
>
>So do I :>)
>
>>I would :
>>
>>BEGIN TRANSACTION
>>llret = TABLEUPDATE(.T.,.F.,vporders)
>>llret = llret AND TABLEUPDATE(.T.,.F.,vpordets)
>>llret = llret AND TABLEUPDATE(.T.,.F.,styles)
>>IF llret
>> END TRANSACTION
>>ELSE
>> ROLLBACK
>> THISFORM.goodsave = .F.
>>ENDIF
>
>Only one problem I see with this approach - the first 2 could fail and the last succeed. Without a lot of added checking in between, I like Frank's approach better in this case.

No - if any one fails then llRet is .F. at the end because of the AND boolean logic.
Cheers,
Jamie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform