EDN Admin
Well-known member
I read that this would enable record locking in my situation. Mode=Share Deny None; Jet OLEDB
atabase Locking Mode=1;
But Its not working.
I have a Windows Forms applicaiton in VS 2010 that is connected to a Microsoft Access DB though Microsoft.ACE.OLEDB.12.0 provider.
The application is bascially done but I want to implement some sort of record locking. I will have two users actively using this application and they may have the same record open at the same time. I would like the record locked for editing when the 1st
person opens it.
Is this possible with my current configuration? Let me know if I need to provide more details.
Also- I prefer the locking record method but I have an alternative in mind but I dont know how to accomplish it.
"I have a field to track the date and time the record was last saved. When a user opens the form it shows them the last date&time it was saved.. Duh.. When someone attempts to save a record I would like it to compare the date and time it got from Access
when the form was opened and compare it to the date and time stored in Acess. If the date and time is different I would prevent the form from being saved and warn the user "someone already made changes to this form" They would need to close it and then
re-open it. The reason I cannot accomplish this is because when the form is first opened it retrieves the data and after that I dont know how to check the value of an access DB record without basically re-populating the form.
So basically I want to open a form and existing record for editing... before saving changes check to see if a certain field has changed.. "The last saved date"
Although that would be if I cannot get the records to lock when a user is editing it.
View the full article

But Its not working.
I have a Windows Forms applicaiton in VS 2010 that is connected to a Microsoft Access DB though Microsoft.ACE.OLEDB.12.0 provider.
The application is bascially done but I want to implement some sort of record locking. I will have two users actively using this application and they may have the same record open at the same time. I would like the record locked for editing when the 1st
person opens it.
Is this possible with my current configuration? Let me know if I need to provide more details.
Also- I prefer the locking record method but I have an alternative in mind but I dont know how to accomplish it.
"I have a field to track the date and time the record was last saved. When a user opens the form it shows them the last date&time it was saved.. Duh.. When someone attempts to save a record I would like it to compare the date and time it got from Access
when the form was opened and compare it to the date and time stored in Acess. If the date and time is different I would prevent the form from being saved and warn the user "someone already made changes to this form" They would need to close it and then
re-open it. The reason I cannot accomplish this is because when the form is first opened it retrieves the data and after that I dont know how to check the value of an access DB record without basically re-populating the form.
So basically I want to open a form and existing record for editing... before saving changes check to see if a certain field has changed.. "The last saved date"
Although that would be if I cannot get the records to lock when a user is editing it.
View the full article