[Gambas-user] PictureDatabase with PostgreSQL

Pino Zollo pinozollo at ...626...
Tue Jul 14 20:07:28 CEST 2009


Hi,

I am trying to use the example "PictureDatabase" with PostgreSQL but I get the 
following error:

"Invalid byte sequence for encoding UTF-8"

when executes the instruction:

 newPicture.Update() 

in PUBLIC SUB Add(ImagePath AS String)

The creation of the database structure seems correct:
-----------
  Tabella "public.pictures"
   Colonna   |  Tipo  |                     Modificatori                      
------------------+--------+-------------------------------------------------------
 id               | bigint | not null default 
nextval('pictures_id_seq'::regclass)
 thumb        | bytea  | 
 image         | bytea  | 
 description | text   | 
Indici:
    "pictures_pkey" PRIMARY KEY, btree (id)
-----------

I have tried also to create manually the database with the option -E UTF-8, 
but no change. (By the way how can this done in GAMBAS ? as 
databaseConnection.Databases.Add(DBName)  does not permit other parameters)

I do not understand if the problem is in PostgreSQL or in GAMBAS....

It seems that that picture is treated as a text string instead of a blob.

Thanks for any idea.  (PostgreSQL 8.3, GAMBAS 2.14, Debian 5.0.1, QT)

Pino


-- 
Key ID: 0xF6768208 
Key fingerprint = B16D 0A7C 5B29 A334 CE6A  71F6 EAF8 3D88 F676 8208
Key server: hkp://wwwkeys.eu.pgp.net




More information about the User mailing list