Board index » delphi » LoadFromFile not working with MS Access Memo field

LoadFromFile not working with MS Access Memo field

I am trying to copy binary files (documents) into a Microsoft Access 97
memo field without much success. I am using the following code :-
  with TableReports.FieldByName('Report') as TBlobField do
    begin
    TransLiterate := False;
    LoadFromFile(sFilename);
    end;
This writes a few characters but as soon as it hits a non ascii
character it stops. SaveToFile works just fine, even with binary data.
I found a workaround by making the field an OLE Object type in Access
and then everything works correctly.  However, I want to keep the field
as a Memo field.
I am using BDE 5.01 and Delphi 4.02.
Is there a problem with MS Access, BDE or my code?

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 

Re:LoadFromFile not working with MS Access Memo field


Did you try a Binary Blob Field ?

Other Threads