Re: Delphi 2007 - TBlobfield error
- From: "Clayton Arends" <nospam_claytonarends@xxxxxxxxxxx>
- Date: Mon, 3 Mar 2008 08:49:47 -0800
"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
.
- References:
- Delphi 2007 - TBlobfield error
- From: Sandro
- Delphi 2007 - TBlobfield error
- Prev by Date: Re: Reconnect does not work TADOconnection
- Next by Date: TADOStoredProc problem
- Previous by thread: Delphi 2007 - TBlobfield error
- Next by thread: Re: Reconnect does not work TADOconnection
- Index(es):
Relevant Pages
|