dbTalk Databases Forums  

Two users editing the same record

comp.databases.ms-access comp.databases.ms-access


Discuss Two users editing the same record in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
Lou O
 
Posts: n/a

Default Re: Two users editing the same record - 10-14-2008 , 09:17 PM






On Oct 12, 12:59*am, CDMAPos... (AT) fortunejames (DOT) com wrote:
Quote:
On Oct 9, 2:56 am, lyle fairfield <lylef... (AT) yah00 (DOT) ca> wrote:

Lou O <lgeastw... (AT) gmail (DOT) com> wrote innews:5468d121-5208-4a1d-833f-9da31ed8263c (AT) c22g2000prc (DOT) googlegroups.com:

Here's a simple solution I've tried with some success
when userA opens the record set a field in the record (ie fldEdit) to
a value (ie 1)
if userB tries to open the record test value of fldEdit
If value is 1, deny access to the record, if value is (ie 0), allow
access.
when userA closes the record, reset fldEdit to 0.

Ouch!

--
lyle fairfield

I'll try to expand on Lyle's comment :-). *I think that Microsoft
started down that path to the dark side before seeing the light.
Here's an example of the kinds of subtle problems that can come up:

http://msdn.microsoft.com/en-us/magazine/cc163744.asp

Microsoft put a lot of attention into C# to allow allow programs to
take advantange, both now and in the future (for code written today),
of the availability of multiple cores. *I.e., your code automatically
runs faster in the future if more cores become available. *In addition
to including tools for safe thread locking, they also came up with
some ideas that did not involve locks. *Unfortunately, they did not
build these capabilities into any version of Access. *I suppose they
wanted SQL Server to harness the parallelism made possible by multiple
cores on a server rather than trying to include those features in
unmanaged code. *IMO, the lack of capability for utilizing multiple
cores is the most glaring weakness that Access has at the present
time. *Hopefully the article will make you aware of some of the
potential problems before encountering them.

James A. Fortune
CDMAPos... (AT) FortuneJames (DOT) com
The link you posted didn't work.
However, I realize my solution is a somewhat simplistic approach and
prone to some problems.
The one I mostly encounter is a user exiting the record improperly
thus not re-setting the edit field.
To overcome that I provide a reset button on the form. Of course this
doesn't guarantee someone else has not
opened the record in the meantime.
But like Tony says somewhere else in this thread; "so what, given the
very unlikely chances of this
happening?"
And if it happens I still have the Form_Error event to fall back on.


Reply With Quote
  #22  
Old   
Chuck
 
Posts: n/a

Default Re: Two users editing the same record - 10-15-2008 , 08:17 AM






On Tue, 14 Oct 2008 19:17:15 -0700 (PDT), Lou O <lgeastwood (AT) gmail (DOT) com> wrote:


Quote:
But like Tony says somewhere else in this thread; "so what, given the
very unlikely chances of this happening?"
A very wise old man said, "If you don't make something dammed fool proof,
pretty soon you are going to find one."

Chuck



Reply With Quote
  #23  
Old   
CDMAPoster@fortunejames.com
 
Posts: n/a

Default Re: Two users editing the same record - 10-16-2008 , 10:58 PM



On Oct 14, 10:17 pm, Lou O <lgeastw... (AT) gmail (DOT) com> wrote:

Quote:
The link you posted didn't work.
That's strange. I'm sure I tried the link before I posted it. Maybe
try the wayback machine -- seriously.

I'm not trying to bust your fun Dude. Access is a great environment
for learning about record locking, transactions, etc. and I love it
dearly, but Microsoft seems to be deliberately placing Access in a
position that is significantly weaker than it was in just a few years
ago. If you get something that works for you, that's great. By
warning you about the problems Microsoft encountered I was hoping to
keep you from getting some recondite error in the future that could
have been prevented.

James A. Fortune
CDMAPoster (AT) FortuneJames (DOT) com




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.