Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-31 Thread Julius Tuskenis
Albe Laurenz rašė: I don't quite understand what you wrote about lo_read and libpq, because libpq provides lo_open. All I wanted to say, is that it's the components that "talks" to libpq, so there's not a nice way of programming to violate the route "your code -> component code -> libpq". So th

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-31 Thread Albe Laurenz
Please don't top post. Julius Tuskenis wrote: >> Large Objects >> (http://www.postgresql.org/docs/current/static/largeobjects.html) >> use OID columns, and they work fine for storing binary data like images. > > In the article you provided it is said that "The return value is the OID > that was

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-30 Thread Julius Tuskenis
Hello, Albe In the article you provided it is said that "The return value is the OID that was assigned to the new large object..." (function Oid lo_creat(PGconn *conn, int mode);). That means that not the large object is stored in OID field - its just the reference to it. Any way I find it muc

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-30 Thread Albe Laurenz
dbalinglung wrote: >> I seriously doubt you could store an image in oid typed column, because >> "The oid type is currently implemented as an unsigned four-byte >> integer." (from postgresql 8.2 manual). I too use Zeos with no problems >> using bytea type. > > Ok, I'll try your sugestion, many t

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-30 Thread dbalinglung
Ok, I'll try your sugestion, many thanks bro. Regards, dbalinglung >- Original Message - >From: "Julius Tuskenis" >To: "dbalinglung" >Sent: Tuesday, December 30, 2008 5:39 PM >Subject: Re: [GENERAL] Load Image File From PostgreSQL DB >

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-30 Thread dbalinglung
ly connected to PostgreSQL Database using Zeos Component. Any sugestion for me bro ? many thanks and regards, dbalinglung >- Original Message - >From: "Julius Tuskenis" >Cc: >Sent: Tuesday, December 30, 2008 2:46 PM >Subject: Re: [GENERAL] Load Image File

Re: [GENERAL] Load Image File From PostgreSQL DB

2008-12-29 Thread Julius Tuskenis
Hi, dbalinglung. You are probably confusing types oid and lo or bytea. There's no way you could put a image into oid column. I'm using bytea type without problems. Also check "bytea as lo" checkbox in ODBC dialog (if you use ODBC). Also TDBImage is no good if you want to use jpg files. I found

[GENERAL] Load Image File From PostgreSQL DB

2008-12-29 Thread dbalinglung
Dear Expert, I'm sorry for my newbie question, I have a dificulty to load image file from field OID type on PostgreSQL with Borland Delphi 7. I would like to showing image file with TDBImage component to Delphi Form, but the image file can't display, any sugestion for me about how can i do to