Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: ADO Record Locking


Message #1 by "George Oro" <george@c...> on Mon, 27 Jan 2003 17:41:17 +0400
Hi Guys,

Is the Default Record Locking (Edited Record) under the Tools/Options/Advance is applicable using Unbound Form (ADO)?

My main objective is, if user1 click the edit button to edit record# 100, no other user can edit or delete the same record# till
user1 save the record.

My visual plan is to add one field "ActionMode" on my master table then if the user click cmdEdit or cmdDelete, one piece of code
will run to check:

If ActionMode=False then 'OPEN TO EDIT OR DELETE
	ActionMode=True 'LOCK
	rs.update ' Just the action mode
else
	beep
	msgbox"This record is locked by user blah blah blah. Editing and Deleting is not allowed."
end if

Is there any other easy way to accomplish the above? By the way I'm using Access2000 for both (Front/Back-End).

Any tips would be highly appreciated.


TIA,
George


Message #2 by "Enzo Zaragoza" <enzaux@g...> on Tue, 28 Jan 2003 08:06:04 +0800
Just a suggestion:

	Before I was also faced by that scenario also and I end up doing this:

1.)  I use UPDATE statement when doing an updates.
2.)  I've used time stamp method.
3.)  I allow multiple users to edit the record but only one could save first.
4.)  If there is someone who edited the record first and updated it (comparing
     the time stamps) then I would give the option for the user if he wants to
     reload the record or just overwrite the changes made by the other user.

	As of now I have no problem regarding this on a multiuser environment.

enzo c",)
Yahoo ID: yackydidakdak
o!O TrOpang Watak Watak
http://www.tropangwatakwatak.tk

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Monday, January 27, 2003 9:41 PM
To: Access
Subject: [access] ADO Record Locking


Hi Guys,

Is the Default Record Locking (Edited Record) under the Tools/Options/Advance is applicable using Unbound Form (ADO)?

My main objective is, if user1 click the edit button to edit record# 100, no other user can edit or delete the same record# till
user1 save the record.

My visual plan is to add one field "ActionMode" on my master table then if the user click cmdEdit or cmdDelete, one piece of code
will run to check:

If ActionMode=False then 'OPEN TO EDIT OR DELETE
	ActionMode=True 'LOCK
	rs.update ' Just the action mode
else
	beep
	msgbox"This record is locked by user blah blah blah. Editing and Deleting is not allowed."
end if

Is there any other easy way to accomplish the above? By the way I'm using Access2000 for both (Front/Back-End).

Any tips would be highly appreciated.


TIA,
George






Message #3 by "George Oro" <george@c...> on Tue, 28 Jan 2003 08:35:37 +0400
Thanks "Kabayang" Enzo, I will try your suggestion after I finalized what I just think to have a flag
"ActionMode" on each record
because I don't want to allow multiple users to edit one record.

TY,
George


> -----Original Message-----
> From: Enzo Zaragoza [mailto:enzaux@g...]
> Sent: Tuesday, January 28, 2003 4:06 AM
> To: Access
> Subject: [access] RE: ADO Record Locking
>
>
>
> Just a suggestion:
>
> 	Before I was also faced by that scenario also and I end up doing this:
>
> 1.)  I use UPDATE statement when doing an updates.
> 2.)  I've used time stamp method.
> 3.)  I allow multiple users to edit the record but only one could save first.
> 4.)  If there is someone who edited the record first and updated it (comparing
>      the time stamps) then I would give the option for the user if he wants to
>      reload the record or just overwrite the changes made by the other user.
>
> 	As of now I have no problem regarding this on a multiuser environment.
>
> enzo c",)
> Yahoo ID: yackydidakdak
> o!O TrOpang Watak Watak
> http://www.tropangwatakwatak.tk
>
> -----Original Message-----
> From: George Oro [mailto:george@c...]
> Sent: Monday, January 27, 2003 9:41 PM
> To: Access
> Subject: [access] ADO Record Locking
>
>
> Hi Guys,
>
> Is the Default Record Locking (Edited Record) under the Tools/Options/Advance is applicable using Unbound Form (ADO)?
>
> My main objective is, if user1 click the edit button to edit record# 100, no other user can edit or delete the same record#
till
> user1 save the record.
>
> My visual plan is to add one field "ActionMode" on my master table then if the user click cmdEdit or cmdDelete, one piece of
code
> will run to check:
>
> If ActionMode=False then 'OPEN TO EDIT OR DELETE
> 	ActionMode=True 'LOCK
> 	rs.update ' Just the action mode
> else
> 	beep
> 	msgbox"This record is locked by user blah blah blah. Editing and Deleting is not allowed."
> end if
>
> Is there any other easy way to accomplish the above? By the way I'm using Access2000 for both (Front/Back-End).
>
> Any tips would be highly appreciated.
>
>
> TIA,
> George
>
>
>
>
>
>
>
>

Message #4 by "Enzo Zaragoza" <enzaux@g...> on Tue, 28 Jan 2003 13:10:14 +0800
	Okies kabayan! ;p

enzo c",)
Yahoo ID: yackydidakdak
o!O TrOpang Watak Watak
http://www.tropangwatakwatak.tk

o!O TWW Business Solutions, Inc.
"Always looking for contract opportunities."
For interested clients you can contact TWW BSI at twwbsi@y...

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Tuesday, January 28, 2003 12:36 PM
To: Access
Subject: [access] RE: ADO Record Locking


Thanks "Kabayang" Enzo, I will try your suggestion after I finalized what I just think to have a flag "ActionMode" on each record
because I don't want to allow multiple users to edit one record.

TY,
George


> -----Original Message-----
> From: Enzo Zaragoza [mailto:enzaux@g...]
> Sent: Tuesday, January 28, 2003 4:06 AM
> To: Access
> Subject: [access] RE: ADO Record Locking
>
>
>
> Just a suggestion:
>
> 	Before I was also faced by that scenario also and I end up doing this:
>
> 1.)  I use UPDATE statement when doing an updates.
> 2.)  I've used time stamp method.
> 3.)  I allow multiple users to edit the record but only one could save first.
> 4.)  If there is someone who edited the record first and updated it (comparing
>      the time stamps) then I would give the option for the user if he wants to
>      reload the record or just overwrite the changes made by the other user.
>
> 	As of now I have no problem regarding this on a multiuser environment.
>
> enzo c",)
> Yahoo ID: yackydidakdak
> o!O TrOpang Watak Watak
> http://www.tropangwatakwatak.tk
>
> -----Original Message-----
> From: George Oro [mailto:george@c...]
> Sent: Monday, January 27, 2003 9:41 PM
> To: Access
> Subject: [access] ADO Record Locking
>
>
> Hi Guys,
>
> Is the Default Record Locking (Edited Record) under the Tools/Options/Advance is applicable using Unbound Form (ADO)?
>
> My main objective is, if user1 click the edit button to edit record# 100, no other user can edit or delete the same record#
till
> user1 save the record.
>
> My visual plan is to add one field "ActionMode" on my master table then if the user click cmdEdit or cmdDelete, one piece of
code
> will run to check:
>
> If ActionMode=False then 'OPEN TO EDIT OR DELETE
> 	ActionMode=True 'LOCK
> 	rs.update ' Just the action mode
> else
> 	beep
> 	msgbox"This record is locked by user blah blah blah. Editing and Deleting is not allowed."
> end if
>
> Is there any other easy way to accomplish the above? By the way I'm using Access2000 for both (Front/Back-End).
>
> Any tips would be highly appreciated.
>
>
> TIA,
> George
>
>
>
>
>
>
>
>






  Return to Index