Recent

Author Topic: TPSQL and blob field  (Read 5400 times)

boladu

  • Guest
TPSQL and blob field
« on: May 18, 2006, 03:25:30 am »
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

  • Full Member
  • ***
  • Posts: 154
  • El conocimiento si ocupa lugar.
Re: TPSQL and blob field
« Reply #1 on: August 29, 2014, 12:09:49 pm »
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)
Devuan Beowulf 3.0( JWM/ROX/iDesk) - Puppy Linux,  Haiku OS,.ReactOS 0.4.xx  - FreeDos .

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: TPSQL and blob field
« Reply #2 on: August 29, 2014, 02:05:22 pm »
« Last Edit: August 29, 2014, 08:32:04 pm by goodname »

 

TinyPortal © 2005-2018