303factory
Registered User.
- Local time
- Today, 09:05
- Joined
- Oct 10, 2008
- Messages
- 136
Hi
We've got a rather strange problem with our access database, we're getting the following error while trying to udpate the text in a memo field
'Could not save; currently locked by another user'
This occurs if only one person is using the database. Performing a compact/repair doenst fix the error.
This seems to be dependant on the amount of text in the field. If you cut half of it out from the table manually it works next time. I've looked around on the internet and found reference to problems with memos where you are adding text so the amount of characters exceeds 2048. For example:
http://groups.google.com/group/comp...hread/6093c4f4b8c931f9/88987d8e59b63db5?pli=1
However the solutions ive read dont apply to us. the problem usually occurs with a sql back end or when updating from a bound form. We're updating the field from code
A form is open linked to the same table (although the ExhibitNotes field is not bound to the form) and the form is refreshed and requiried before the code update is attempted so dont think that's causing a conflict.
A forum implied clearing the field and adding all the data again fixes the problem but can't work out how to do this by code (setting the field to "" causes the same error). Does anyone have any ideas?
We've got a rather strange problem with our access database, we're getting the following error while trying to udpate the text in a memo field
'Could not save; currently locked by another user'
This occurs if only one person is using the database. Performing a compact/repair doenst fix the error.
This seems to be dependant on the amount of text in the field. If you cut half of it out from the table manually it works next time. I've looked around on the internet and found reference to problems with memos where you are adding text so the amount of characters exceeds 2048. For example:
http://groups.google.com/group/comp...hread/6093c4f4b8c931f9/88987d8e59b63db5?pli=1
However the solutions ive read dont apply to us. the problem usually occurs with a sql back end or when updating from a bound form. We're updating the field from code
Code:
Public Function AddExhibitNote(strNote As String)
Set tempExhibitRS = New ADODB.Recordset
strSQL = "SELECT * FROM tblExhibitInfo WHERE UniqueRef =" & gUniqueRef
tempExhibitRS.Open strSQL, gMIDdbase, adOpenKeyset, adLockOptimistic, adCmdText
tempExhibitRS.Fields("ExhibitNotes") = tempExhibitRS.Fields("ExhibitNotes") & vbNewLine & Now & " - " & gUser & " - " & strNote
tempExhibitRS.Update
tempExhibitRS.Close
set tempExhibitRS = nothing
End Function
A forum implied clearing the field and adding all the data again fixes the problem but can't work out how to do this by code (setting the field to "" causes the same error). Does anyone have any ideas?