Solved

Could't Update; Currently Locked by Another Session on this Machine

Posted on 2004-10-28
540 Views
Last Modified: 2008-03-26
There were two previous posts for this question back in Dec 2002 with no resolution.

This problem exists when using a MEMO field (also tested with OLE Object field and get the same error).  The senario is that data is entered into this MEMO field.  Later the field is edited and more data added.  This continues to work until the field has around 2k worth of characters at which time an attempt is made to save the record and then the error message "Could't Update; Currently Locked by Another Session on this Machine" appears.

One work around seems to be to add another record and then come back to this record and then you can get past the 2k limit.  But then the extra record needs to be deleted.
0
Question by:niblick
    8 Comments
     
    LVL 27

    Accepted Solution

    by:
    Hi niblick,

    I would recommend the following:
    make this memo field (memo1) Unbound and it will be used for data entry,
    make 2 Bound hidden memo fields,
    On lost focus of the memo1, count the number of characters, and if more than 2k, then split them in both the hidden memo fields,
    otherwise fill in the first hidden memo field.

    On Current of the Form, make sure:
    [memo1]=[memo2] & [memo3]

    Hope this helps

    Jaffer
    0
     
    LVL 34

    Expert Comment

    by:flavo
    2k??? Dont they hold 64k charaters???
    0
     
    LVL 5

    Author Comment

    by:niblick
    flavo........yes, a memo field holds 64k characters.

    jjafferr,
    The field is already unbounded and I have tried to update using methods and recordsets.  I currently am not displaying the full contents of the field and only use the form field to append the data via an update to the existing data.  This has sparked an idea in my mind though, something about what was said in another thread.  Something about two forms being open.  I do not have the form opened twice but I do have the record open on two forms.   The initial display form and then the edit form.  Perhaps if I close the initial display form and reopen it after I have finished with the edit form then this might get around the locking problem.  Let me test it out and if it works I will give you the points for making me think to hard.  Ow, it hurts!
    nib
    0
     
    LVL 5

    Author Comment

    by:niblick
    Just a note so everyone knows why I have a display form and an 'edit' form.  The first form just displays the data.  Users cannot edit the data on this form.  The application is like a running journal where you can add comments but not edit what has already been entered.  Therefore, the second form is only used to add new comments to the existing comments field.
    0
     
    LVL 5

    Author Comment

    by:niblick
    The problem seems to have been with having the other form still open and locking the record.  What I do now is close the current form before opening the 'edit' (add comments) form.  Then when I close this form I re-open the other form.

    jjaffer, thanks for making me think.
    0
     
    LVL 27

    Expert Comment

    by:jjafferr
    Hey I have too many other ideas, I don't mind throwing some to get you think more and throw some points at me ;o)

    Thanks for the points and the grade.

    jaffer
    0
     

    Expert Comment

    by:ajg23
    Dang, I have the same problem but do NOT want to close the original form (which has a list of notes from encounters). Really would love another workaround...
    0
     

    Expert Comment

    by:ajg23
    I finally did the following workaround which I'm pretty happy with given the limitations of this Acess problem: I wound up writing a TRUNCATED version of the big memo field to the record in addition to the big memo field itself. Only the TRUNCATED version is in the query in the main list so it doesn't interfere with my EDIT form's ability to save! (The edit form saves a truncated version after the main version!)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: From Zero to Hero with Nodejs & MongoDB

    Interested in Node.js, but don't know where to start or how to learn it properly? Confused about how the MEAN stack pieces of MongoDB, Expressjs, Angularjs, and Nodejs fit together? Or how it's even possible to run JavaScript outside of the browser?

    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now