Board index » delphi » putting a binary file in a Paradox database memo field

putting a binary file in a Paradox database memo field

I am trying to put a binary file into a paradox database memo field.
Using the LoadFromFile and SaveToFile methods of a TBlobField work for
text files but I can't get them to work for a binary file (well they
kind of work but the file gets corrupted).  I am using the FieldByName
method of a TQuery object to get the TField for the memo field in the
database.  Then I cast the TField to a TBlobField.  Does anyone have any
suggestions?  I would really appreciate it!  Thanks.

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

 

Re:putting a binary file in a Paradox database memo field


Quote
On Thu, 03 Jun 1999 01:42:42 GMT, keithwi...@my-deja.com wrote:
>I am trying to put a binary file into a paradox database memo field.
>Using the LoadFromFile and SaveToFile methods of a TBlobField work for
>text files but I can't get them to work for a binary file (well they
>kind of work but the file gets corrupted).  I am using the FieldByName
>method of a TQuery object to get the TField for the memo field in the
>database.  Then I cast the TField to a TBlobField.  Does anyone have any
>suggestions?  I would really appreciate it!  Thanks.

Are you really using a Paradox Memo field type? Memo fields are designed to
store text data, not binary data. Storing binary data to such fields causes
attributes of binary files to be lost in the conversion to and from text.
Try using a Binary field instead.

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Steve Koterski     "An inventor is a person who makes an ingenious
Felton, CA         arrangement of wheels, levers and springs, and believes
                   it civilization."          -- Ernest Dimnet (1866-1954)

Other Threads