Hi all,
I use DAO in a VB6 project. I have a table with a few colums there, one of them is dbMemo (data type), it's Acess database.
I have a RTF box for notes in the program, and for some reason, when I assign text longer than 1950~ (aprox) characters to the field with dbMemo, I can not perform .update method of the recordset and it crashes there. It works fine with shorter text (eg. 1400 characters)
Is there any solution?
It's declared like this:
VB Code:
.Fields.Append .CreateField("Notes", dao.DataTypeEnum.dbMemo)
And here is the part where the program crashes:
VB Code:
odToDoLists.FindFirst "DATE = #" & Format(frmMain.dtDate.Value, "m-d-yy") 'No prob here, finds the record odToDoLists.Edit Dim liFt As Long For liFt = 1 To Len(frmMain.rtfNotes.TextRTF) Step 64000 'This should be also correct way how to insert data to db if I am right odToDoLists!Notes.AppendChunk Mid$(frmMain.rtfNotes.TextRTF, liFt, 64000) Next liFt odToDoLists.Update ' <- crashes here if the text has more than aprox. 1950 chars
Thank you very much for any help!




Reply With Quote