TPSQL and blob field lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- boladu · 2006-05-18 01:25 Hi all. Anyone can help me how to read and store to blob type field using PostgreSQL database (using TPSQL)? I am using Linux and database server is on another host. Using lo_import and lo_export  from PostgreSQL query command is only applicable on same computer. I suppose that libpq does not support lo_import and/or lo_export to another computer. Need advise... boladu ---------------------------------------------------------------------- jma_sp · 2014-08-29 10:09 I know this post is old but the question is important. Also i has unable to read and store blobtype. Postgresql 9.xx have a new type called bytea but also i was unable to figure how to transfer it including using tdbimage. tblob is different of bytea.  sql:='....................................'; How can use variable to transfer it within de sql sentence? and executedirect? I have tryed with lo_import(''c:\prueba\imagen.png'') in sql string but doesnt work   sql:='.................... =lo_import(''c:\prueba\imagen.png'')............;';   pqconnection1.open;   pqconnection1.ExecuteDirect('Begin Work;');   pqconnection1.ExecuteDirect(sql);   pqconnection1.executedirect ('Commit Work;');   dbgrid1.datasource.dataset.Refresh;  I can isert values in other simple columns but no in column (imagen bytea) ---------------------------------------------------------------------- goodname · 2014-08-29 12:05 Wrote this some time ago. It should help. http://forum.lazarus.freepascal.org/index.php/topic,16205.msg87713.htm l#msg87713