Storing data into a PostgreSQL 8.1 table
- From: Pegasus86 <Pegasus86@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 15 Mar 2006 00:09:11 +0100
Hi,
I'm using Delphi 2006 to insert data into a PostgreSQL 8.1 table, containing a bytea field which should store Word documents.
Since Zeos does NOT work with D2006, I have decided to use ADO (dbGO), which seems to work quite well.
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! I have also changed the driver settings in the Control Panel, but the problem still remains.
In addition, I think it's a bad solution, since I should keep in memory a very big string for files of some megabytes...
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 data into a PostgreSQL 8.1 table
- From: Jackson Gomes - Tools&Comps
- Re: Storing data into a PostgreSQL 8.1 table
- Prev by Date: Re: Batch Updates
- Next by Date: Re: Storing data into a PostgreSQL 8.1 table
- Previous by thread: strange behavior after changing a field length - ADO, Oracle, D7 Pro (patched)
- Next by thread: Re: Storing data into a PostgreSQL 8.1 table
- Index(es):
Relevant Pages
|