Results 1 to 3 of 3

Thread: [Resolved] DAO problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    2

    Resolved [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:
    1. .Fields.Append .CreateField("Notes", dao.DataTypeEnum.dbMemo)

    And here is the part where the program crashes:

    VB Code:
    1. odToDoLists.FindFirst "DATE = #" & Format(frmMain.dtDate.Value, "m-d-yy") 'No prob here, finds the record
    2.  
    3. odToDoLists.Edit
    4. Dim liFt As Long
    5. For liFt = 1 To Len(frmMain.rtfNotes.TextRTF) Step 64000
    6.     'This should be also correct way how to insert data to db if I am right
    7.     odToDoLists!Notes.AppendChunk Mid$(frmMain.rtfNotes.TextRTF, liFt, 64000)
    8. Next liFt
    9.  
    10. 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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: DAO problem

    Welcome to the forums.

    What is the specific error message?

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    2

    Resolved 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
  •  



Click Here to Expand Forum to Full Width