Storing files in PostgreSQL 8.1
- From: Pegasus86 <Pegasus86@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 09 Mar 2006 23:02:07 GMT
Hi,
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's 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?
Thanks.
.
- Follow-Ups:
- Re: Storing files in PostgreSQL 8.1
- From: Riki Wiki
- Re: Storing files in PostgreSQL 8.1
- Prev by Date: Re: Setting DBPROP_BOOKMARKS Property- Help!!!!!
- Next by Date: Dataset.Sort and scandic characters
- Previous by thread: Bi-Directional Cursors in ADO - URGENT HELP NEEDED !!
- Next by thread: Re: Storing files in PostgreSQL 8.1
- Index(es):
Relevant Pages
|