Results 1 to 15 of 15
  1. #1
    Join Date
    Apr 2005
    Posts
    61

    Unanswered: Runtime error 3188 while updating Memo field

    Ok here is the problem i can't find an answer to anywhere. I am trying to update a memo field. I can import it into the database no problem. I then try to modify the field in a form and when I try to update the database I received the 3188 runtime error. I've google searched but no answer. The field is about 2600 characters. Here is the code to update the memo field.

    sqltxt = "Update Phone_Calls Set Call_Notes_1 = '" & NotesField_Text.Value & "' Where ID = " & lngGlobalCallRecordNumber & ""

    DoCmd.RunSQL sqltxt


    Any help would be greatly appreciated.

    Mythos

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    3188 is a concurrency issue. What's going on when you execute your RunSQL command? Is that record open somewhere else? Is this a multi-user platform?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Apr 2005
    Posts
    61

    What I'm doing

    Hello,

    Ok I have my main form. Then a sub form that just lists records on another table. The script is updating a selected record on the sub form table.

    The script work fine if the text is a LOT smaller. but when it's large like this I get the run time error.

    Thanks again and hope to be able to get a solution.


    Mythos.

  4. #4
    Join Date
    Sep 2006
    Posts
    7
    I am having this same problem. Hope you don't mind me tagging along on this post. I update the same way with RunSQL cmnd. I have a main form that holds a Memo. The customers thought that Memos were disappearing because they were getting too large so they asked me to build a form where they could insert smaller notes that would then be used to build the memo on the main form.

    The updates work as long as the overall number and size of notes isn't too big. But it seemingly is affected by the size of the combined notes when I try to update the memo. I don't know any other way to get the notes from the sub form onto the Memo field on the Main Form. And yes the record is still open on the main form.

  5. #5
    Join Date
    Sep 2006
    Posts
    7
    I got to thinking about what Teddy meant by is another form open using that record.... I feel really stupid now, but of course the record locked because my main form was still using the record.

    In my Update routine, I closed the main form and at the end of the Update routine, I open it back up using the same ID that tie the record to the tblNotes... which in turn make the memo. Problem solved for me.

    My posted solution
    Last edited by Imdabaum; 09-26-06 at 15:35.

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    And you know what? The scary thing is that you've not identified the BIG (I mean 400 lb gorilla here ...) issue with doing your UPDATE using the RunSQL method ... Quotes and single quotes (or apostrophes as you will) ... Those embedded in your text field will blow up that SQL statement ...

    I have always dealt with memo fields using recordsets (DAO or ADO) and the attendant AppendChunk method to save/update memos ... It eliminates this problem.
    Back to Access ... ADO is not the way to go for speed ...

  7. #7
    Join Date
    Sep 2006
    Posts
    7
    This is why I am only an intern... so would you mind explaining the AppendChunk mehtod? Because this close form/Open form is going to make a bigger monkey of me. I mean opening the form with the condition statement opens the form with one record and after that the user has to disable the filter.. in order to advance the record again without nulling out/ or making a new record.

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Imdabaum
    This is why I am only an intern... so would you mind explaining the AppendChunk mehtod? Because this close form/Open form is going to make a bigger monkey of me. I mean opening the form with the condition statement opens the form with one record and after that the user has to disable the filter.. in order to advance the record again without nulling out/ or making a new record.
    Since you are an intern, why don't you look it up ... Help pages are so much better explaining what stuff does/is supposed to do better than I ...
    Back to Access ... ADO is not the way to go for speed ...

  9. #9
    Join Date
    Sep 2006
    Posts
    7
    Good point.

  10. #10
    Join Date
    Sep 2006
    Posts
    7
    I used the AppendChunk and it still throws up the error. That the session is locked and couldn't update. I modified the code to do like this.

    rst.FindFirst "ID = " & PropID
    If Not rst.NoMatch Then
    'DoCmd.Close acForm, "frmPropertiesNew", acSaveYes
    rst.Edit
    rst.Fields("Memo").AppendChunk (strMemo)
    rst.Update
    'DoCmd.OpenForm "frmPropertiesNew", acNormal
    End If

    no more dirty apostraphe's that would cause problems in the SQL. When I take uncomment the close/ open frmProperties commands the edit works fine.
    But if I continue with this plan I need a way to recall the record to the main form from the subform where I am updating the small notes.

  11. #11
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    If they are SQL Server Linked tables, could putting the timestamp datatype field in the table have any affect? It solved my problem with not being able to update the Memo field on a linked table.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  12. #12
    Join Date
    Sep 2006
    Posts
    7
    I'm not sure what you mean by putting the timestamp datatype field in the table. Though I think this would be nice and very good tool to sort the individual notes as well.

  13. #13
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    On SQL Server, add a new field to the table with the memo field and call it: TimeStamp and set the data type to TimeStamp. Are you working with SQL Server linked tables? Make sure you refresh the linked tables (or even re-link them.)
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  14. #14
    Join Date
    Sep 2006
    Posts
    7
    I have a front end and a back end. Front end stores forms, queries, reports, modules, and macros. Back end stores data. I don't think there is a server involved aside from Access's personal engine. The linked tables are only linked into that back end, another Access file. Nothing special.

  15. #15
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    That was only if the tables were SQL Server linked tables. MSAccess doesn't have a timestamp data type field for it's tables so this wouldn't be the same problem.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •