[patch_done] PostgreSQL, problems with BLOB Data

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

[patch_done] PostgreSQL, problems with BLOB Data

Post by mmvisual »

Hello,

I have no Install the newest PostgreSQL Server "postgresql-9.1.3-1-windows.exe" and install Lazarus "Lazarus-1.1-36568-fpc-2.6.0-20120405-win32.exe" and the Zeos Trunc from today.

I can create a new Database, the tables and import the data into the new database. All rows with text are inside, but the BLOB field is corrupt.

I import this data from a SQLite table. When I connect the SQLite table to my EXE, then I see all pictures, but not with PostgreSQL.

With Zeos 6.6.6 have it works fine.

This Error write my EXE into the Log:
"22:56:52 E: Unbekanntes Bildformat"
(Unknown picture format)

If you need more information, then I can help.

Best Regards, Markus.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Hallo Markus,

as far as i know did the Bytea behavior changed since v9. PG8 delivers a hexstring and PG9 delivers a hexString with a starting 'x'A1...! So please download http://zeos.firmos.at/viewtopic.php?t=3427 or the testing-branch...

Everything ok?

Best regards,
Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

Hello Michael,

I have install your "testing-egonhugeist" and there comes this message:

16:58:14 Error: Cannot open database! Out of memory (DB-Connect)

And I cannot open a table.

Yes, all is OK. I have think, I test the new V7 with my EXE and Lazarus. I need the SQLite, MySQL and PostgreSQL. Now, the first two are working good.

Thank you very much for developing the Zeos component!

Best regards Markus.
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

PS: Here the SQL code for the created table. The blobfield is from type "bytea" an there are PNG or JPG images saved with maximum size from 64KB.

Code: Select all

CREATE TABLE foto
(
  id serial NOT NULL,
  id_id integer,
  bezeichnung character varying(100),
  tabelle character varying(30),
  bildtyp character varying(10) NOT NULL,
  bild bytea,
  bilddatei character varying(255),
  aenddatum timestamp without time zone NOT NULL DEFAULT '2012-04-14 22:27:10.345'::timestamp without time zone
)
WITH (
  OIDS=FALSE
);
ALTER TABLE foto
  OWNER TO postgres;
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Patch done Rev 1157.

Danke Markus.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

If in the StringFields are a '\', the displayed string was not right. It is now corrected in:
https://zeoslib.svn.sourceforge.net/svn ... gonhugeist
Rev 1159

@EgonHugeist
Thank you for nice support!
Locked