Board index » delphi » Storing files in PostgreSQL 8.1

Storing files in PostgreSQL 8.1

2006-03-10 07:02:07 AM
I'm using Delphi 2006 to insert data into a PostgreSQL 8.1 table,
containing a bytea field which should store Word documents.
I have decided to use ADO (dbGO).
My problem is that if I interpret the bytea field as a String (by
creating a field at design-time for the AdoRecordSet), and use a
FileToString() routine written by me, it stores only about the first 8k
of the file! (and I think it is a bad solution, since I should keep in
memory a very big string for files of some megabytes...).
I have also changed the driver settings in the Control Panel, but the
problem still remains.
How could I efficiently and correctly store a file (and not its path) in
a bytea field? I need to use just bytea, not OIDs...
Could anyone help me, please?

Re:Storing files in PostgreSQL 8.1

On Thu, 09 Mar 2006 23:02:07 GMT, Pegasus86 writes:
Could anyone help me, please?
You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question.
Take a look here:
which links to