Re: Delphi 2007 - TBlobfield error



"Sandro" <colla.s@xxxxxxxxxx> wrote in message news:47cb08d4@xxxxxxxxxxxxxxxxxxxxxxxxx

TBlobField(ADOTable1.FieldByName(AFieldName)).LoadFromFile(AFilename);

should store the content of a RTF file into a Memo field of a Table of an Access Database.

Is your field's type Memo? Delphi2007 now supports the ftWideMemo type which is what the Memo type is in Access. I haven't experimented with this change yet so can't instruct on a solution. You may need to play around with converting the content via the WideString conversion functions like UnicodeToUtf8, Utf8Encode, etc.

In Delphi 6 it works; in Delphi 2007 no exception raised but into the blob
field isn't stored the content of the file but a a sequence of
nonsense characters!

Are you sure they're nonsense characters? Look at the file with a hex editor to see if the values correspond at all.

Clayton

.



Relevant Pages

  • Re: HELP!!! Corrupt data table
    ... The table stores only a pointer to the location where the memo field is ... Change it to a Make Table query. ... Open the new table in design view, and add the memo field. ... General tips on recovering from corruption: ...
    (microsoft.public.access.formscoding)
  • Re: HELP!!! Corrupt data table
    ... > The table stores only a pointer to the location where the memo field is ... Create a query into your table. ... Open the new table in design view, and add the memo field. ... > General tips on recovering from corruption: ...
    (microsoft.public.access.formscoding)
  • Re: Pasting 1st line of memo field to a text field (revisited)
    ... the first line of memo field into a text field, ... This will not have a CR/LF at the end. ... Then change the table name and memo field name in the code below. ... Dim r As DAO.Recordset ...
    (comp.databases.ms-access)
  • Re: How do I insert date and time before typing a new note in Access 2
    ... view I set up a memo box so employees of my company can type notes into the ... all other employees aware of that. ... timestamp - all in one memo field, I'd VERY strongly suggest using a one to ... This table should have a foreign key field ...
    (microsoft.public.access.gettingstarted)
  • Re: RichText in continuous form
    ... just stick an RTF control on a seperate ... From the Double Click event of the TextBox bound to the Memo field ... > full rich text functionnality. ...
    (microsoft.public.access.formscoding)