Subject | Re: foreing key locking |
---|---|
Author | s_lutti |
Post date | 2010-01-08T12:11:10Z |
Hi Helen,
When I got you and André right, the main problem is to minimize the time when a transaction needs to be active. So the solution from André sounds quite interesting at first, but when I think about our forms with many DBControls I can't fetch the data with a readonly transaction, because then I can't use DBcontrols for editing anymore.
Another idea is to keep the DBControls and fetch the data readonly and do the editing to a memory dataset and when the user klicks the save button everything needs to be posted to the database. But for me this way is to be prone to errors (more of a feeling then real knowledge as I never tried this).
As this problem goes through all our user forms this will lead to some sleepless nights at the weekend... that's for sure :)
> The usual way is to intercept the exception and inform the user that the operation cannot proceed at this time. You could give the user the option to abandon his changes; or give him a retry button if you are confident that the operation will succeed eventually; or place a retry loop in your code with a pause; or put the transaction in WAIT mode if you know that the competing transaction will end quickly.this looks like the best way to solve the problem at the moment. Although it is not satisfying for me I have not enough time to do a complete redesign of our data accessing method.
When I got you and André right, the main problem is to minimize the time when a transaction needs to be active. So the solution from André sounds quite interesting at first, but when I think about our forms with many DBControls I can't fetch the data with a readonly transaction, because then I can't use DBcontrols for editing anymore.
Another idea is to keep the DBControls and fetch the data readonly and do the editing to a memory dataset and when the user klicks the save button everything needs to be posted to the database. But for me this way is to be prone to errors (more of a feeling then real knowledge as I never tried this).
As this problem goes through all our user forms this will lead to some sleepless nights at the weekend... that's for sure :)