Save and load jpg in a PostgreSQL database

From: lfmartinelli <luis(dot)fernando(dot)martinelli(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Save and load jpg in a PostgreSQL database
Date: 2010-11-04 13:00:19
Message-ID: 1288875619752-3249969.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

My name is Fernando, i work with C# and PostgreSQL. I need save a jpg in a
PostgreSQL table.
How do i this? I read in a forum to use this to save in database:

INSERT INTO table (image) VALUES (pg_escape_bytea(image.jpg))

Don't i need convert image file to binary before save in a database?
How get i this image to a variable using c#?

Please help me!

Thanks.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Save-and-load-jpg-in-a-PostgreSQL-database-tp3249969p3249969.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Gould 2010-11-04 15:00:58 Linux
Previous Message Gavin Burrows 2010-11-04 08:58:02 Please Help...