xsharp.eu • Cannot DELETE a record from work area - Page 2
Page 2 of 2

Cannot DELETE a record from work area

Posted: Thu Apr 30, 2020 1:21 pm
by robert
Thomas,

The support for buffered updates, combined with its support functions OldVal(), TableUpdate(), the functions you mentioned etc. are on our todo list for one of the coming builds.

Robert

Cannot DELETE a record from work area

Posted: Thu Apr 30, 2020 1:30 pm
by mainhatten
lumberjack wrote:It was always at our conferences emphasized how to manage multi-user systems and the one that was repeated over and over again, generic RLock()/UnLock functions/methods.
Johan,

If your App needs it, you can always RLock() before editing, which carries its own pitfalls. But I think MS range of option for handling update conflict is good enough for optimistic locking to prevail over pessimistic (which they offer in buffering as well).

Best practices might have been explained in more detail ;-)

regards
thomas

Cannot DELETE a record from work area

Posted: Thu Apr 30, 2020 1:39 pm
by lumberjack
Hi Thomas,
mainhatten wrote: If your App needs it, you can always RLock() before editing, which carries its own pitfalls. But I think MS range of option for handling update conflict is good enough for optimistic locking to prevail over pessimistic (which they offer in buffering as well).
Best practices might have been explained in more detail ;-)
I have done all my programming in a wrapper class Insert/Update/Delete in a Scatter/Gather method and they all basically called the NetTry function that I have shared a couple of days before, nothing fancy but it is solid and I have not touched them since the late '90s. Work even for standalone systems as well as multi-user client server. Less than 100 lines of code.

Cannot DELETE a record from work area

Posted: Thu Apr 30, 2020 3:02 pm
by mainhatten
Hi Johan,
lumberjack wrote:I have done all my programming in a wrapper class Insert/Update/Delete in a Scatter/Gather method and they all basically called the NetTry function that I have shared a couple of days before, nothing fancy but it is solid and I have not touched them since the late '90s. Work even for standalone systems as well as multi-user client server. Less than 100 lines of code.
Certainly not rocket science, but you will run into edge cases where the pessimistic locked records are locked during a telephone call expected to be over in 2 minutes but took 52... I think MS nailed a good default if you have trustable ts_update or better i8_recwrite counter fields which can guarantee optimized access on bulk operations.

regards
thomas

Cannot DELETE a record from work area

Posted: Fri May 01, 2020 10:54 am
by lumberjack
Thomas,
mainhatten wrote: Certainly not rocket science, but you will run into edge cases where the pessimistic locked records are locked during a telephone call expected to be over in 2 minutes but took 52... I think MS nailed a good default if you have trustable ts_update or better i8_recwrite counter fields which can guarantee optimized access on bulk operations.
Well it is a coding style, you can sit a year on a record in my applications and it won't matter. Very similar approach to MS on my DBFs, not that I use DBF anymore though.

Cannot DELETE a record from work area

Posted: Fri May 01, 2020 1:04 pm
by Karl-Heinz
Guys,

The VO DbServer class knows the locking mode CC_OPTIMISTIC. That means - from what i heard ;-) - that the locking and replacement is made automatically. I only used CC_NONE. That means, that i´m alone responsible for the locking and replacement. Freely adopted from what Karl Lagerfeld once said: "If you´ve lost the control of your data dependecies, you have lost the control of your live[strike][/strike]" :)

regards
Karl-Heinz

Cannot DELETE a record from work area

Posted: Fri May 01, 2020 2:40 pm
by mainhatten
Hi Johan,
lumberjack wrote:Well it is a coding style, you can sit a year on a record in my applications and it won't matter. Very similar approach to MS on my DBFs, not that I use DBF anymore though.
For client side stuff I prefer DBF to other formats - as long as no crypto is needed. Saving numerics in binary is main reason over SQLite, portability another. Too bad there is not enough standardization in header/data formats, IMO it would have been a better transmission protocol compared to XML and even JSON, as reading effort takes less computing power.
Multiuser remote access since SMB2 impossible for any SW unless self-used (to take blame)

Yes, it is a matter of use case and style - my reason to only point to IMO "sane defaults".

regards
thomas

Cannot DELETE a record from work area

Posted: Fri May 01, 2020 3:34 pm
by FFF
lumberjack wrote: not that I use DBF anymore though.
Would love to see a "VO-StandardMDI"-Sample, backed by a PG-backend in the Gallery :whistle: .

Cannot DELETE a record from work area

Posted: Fri May 01, 2020 4:01 pm
by lumberjack
Hi Karl,
FFF wrote:
lumberjack wrote: not that I use DBF anymore though.
Would love to see a "VO-StandardMDI"-Sample, backed by a PG-backend in the Gallery :whistle: .
Your :whistle: from long ago is in the back of my mind. I am not too far away from my next DataDriven article publication, so maybe inside of that you will see a sort of ADO.NET MDI application taking shape.