When two different users try to change the same record in the Access 2007 database

Source: Internet
Author: User
Tags commit include table name

Symptoms

Consider the following scenarios. Two different users access the same Microsoft Office Access 2007 database at the same time. The user attempted to change the same record. In this scenario, the user receives the following error message:

Unable to update, currently locked.

In addition, changing a multivalued field on a form does not commit the changes, and then moves to the table after the value is not updated. If you then try to modify the table, in the multivalued field you receive the following error message:

Unable to update, currently locking other sessions on this computer.

Reason

This problem occurs because an attachment or multivalued field uses pessimistic locking. Therefore, the lock is saved to the field until the record is committed.

You can use the record-locking property to determine how the record locks up and what problems two of users try to edit the same record at the same time.

When you set the record lock property to edit a record, the page's record is locked as long as any user starts editing the field in the record. The record of the page remains locked until the user moves to another record. As a result, records are edited by one user at a time. This feature is also called pessimistic locking.

Note Attachments or multivalued fields use pessimistic locking. This problem occurs even though the default record lockout option is set to the Options dialog box Advanced tab that is not locked.

For locking options, see the "RecordLocks Properties" topic in the Access 2007 Help file.

Solution

To resolve this issue, commit the changes. To do this, use one of the following methods.

Method 1: Save the Record

1. Click the Main tab.
2. In the record, click Save.
Method 2: Refresh the Record
1. Click the Main tab.
2. Record, refresh all, and then refresh all.

State

This behavior is by design.

More information

Access 2007, create a field that contains multiple values, such as a list of categories you want to assign a problem to. These fields can be attachment fields or multivalued lists. Steps to reproduce the problem

1. Start Access for 2007 years.
2. Create a new Access 2007 database. accdb file.
3. By default, right-click the table, and then click Design View.
4. Save as a dialog box, in the Table name box, type TestTable, and then click OK.
5. Add a new field named Test. To do this, type Test in the header column, and then select an attachment in the data type column.
6. Save, followed by Datasheet view.
7. Double-click the field to include an attachment to open the Attachment dialog box.
8. Click Add, locate the file, and click Open.
9. Click OK.
10. Click the next record to submit changes to the table.
11. When you create a tab, the table simply hits the form group.
12. Display tabular data, right-click the attachment in the new form, and then click Manage Attachments.
13. In the Attachment dialog box, click Delete, and then click OK. Note that the task did not commit the change.
14. Click the TestTable tab.
15. Double-click the field to include an attachment. The Attachment dialog box appears.
16. Click Delete, select the attachment, and then click OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.