|
-
Feb 25th, 2006, 02:37 AM
#1
Thread Starter
New Member
[Resolved] DAO problem
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!
Last edited by JiriNovotny; Feb 27th, 2006 at 01:43 AM.
-
Feb 26th, 2006, 06:28 PM
#2
Re: DAO problem
Welcome to the forums. 
What is the specific error message?
-
Feb 27th, 2006, 01:42 AM
#3
Thread Starter
New Member
Re: DAO problem
Resolved. It was caused by Index of the field.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|