Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling problems deep in BOs
Message
From
09/10/2003 17:07:40
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00837088
Message ID:
00837111
Views:
36
I'd try first to avoid any record locking, resolving updating conflict in other way.

How can you avoid record locking? If you don't do it yourself, VFP will do it as soon as you try to update the record.


>If the locking error occurs in the middle of a transaction, I think you should roll everything back, inform the user, and let them press the "Save"button again to retry the operation.


That's what I do in most cases when there's a problem. But sometimes there's a minor issue that is holding up really complex operations that take a long time. If it's something they can fix, it would be nice to give them the chance to try that bit again rather than having to completely start over.


>Why? Because transactions should always be as short as possible. If you left the the transaction in the middle, waiting for the user to retry or abort (remeber users tend to talk on the phone, go to the bathroom, etc <s>), then you can keep a transaction open too much time.


That's a good point. Keeping the transaction open is just going to make the locking issues worse. :)

Is there any special circumstance in your case?

Well, they've got some network issues that I suspect are at to root of these contention issues but, other than that, not really.

My question isn't really about record locking. That's just an example. What I'm wondering if there is some way of handling communication with the user without losing your place in the BO code and without adding UI to the BO code.

Thanks,

Michelle
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform