Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D0B4E8B63D8 for ; Wed, 20 Jun 2012 11:40:01 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ShM4e-0003qT-HH for pgsql-admin@postgresql.org; Wed, 20 Jun 2012 14:40:01 +0000 Received: by pbbrp8 with SMTP id rp8so690850pbb.19 for ; Wed, 20 Jun 2012 07:39:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=Sb8AwdHigs7mgRCh1Wlnv70vjVw5l0Hyzhq+1oMhI8I=; b=Qx6sWq0ugS86srfJPMue6rs4Tx1jHylk9mpOqZ7UNgI2l0huK0mkWmXHxQx8dZc7W5 M0GIjcGw3744z8/bYpBO0+pJcWrCDA+GZOkSN49QKiGzgp7dSwA3plIWxEL4tpkTYivB Jizv9YdqvdhdAUbgktGA9UuxAKw4eXcBGsYzWUMvbFOGaLjEN/k+McSFls50mhSALN2U nEKb+RUo4JZuDA+ffAQcVE8oiDIeoIQzhBFtULmtxUzyRvit2gKmUeIxBs+5RMmi5EPS +6nlVnWchVOOfTPsB6I/hhYHiomaQavqtQmNJKw9ZiJyasWS7TulOWSH+cfnQBBxg/Dr iWlw== Received: by 10.68.129.100 with SMTP id nv4mr19979322pbb.153.1340203186991; Wed, 20 Jun 2012 07:39:46 -0700 (PDT) Received: from ayaki.localdomain (58-7-107-203.dyn.iinet.net.au. [58.7.107.203]) by mx.google.com with ESMTPS id op10sm1132504pbc.75.2012.06.20.07.39.44 (version=SSLv3 cipher=OTHER); Wed, 20 Jun 2012 07:39:46 -0700 (PDT) Message-ID: <4FE1E0AD.80405@ringerc.id.au> Date: Wed, 20 Jun 2012 22:39:41 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Vishwas Dwivedi CC: pgsql-admin@postgresql.org Subject: Re: Issue in save and retreive file in postgres References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------070104080603060306030802" X-Gm-Message-State: ALoCoQkfSilwfXSH7vSPi9sjTMa/msMRI7bqRyrS5EqyEOZeGcgxCtmYrn3CWYEwd5QEn2YKzs46 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/90 X-Sequence-Number: 39681 This is a multi-part message in MIME format. --------------070104080603060306030802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 06/15/2012 09:16 PM, Vishwas Dwivedi wrote: > Greetings, > > I am a software programmer and working on a .net web > application(ASP.NET 4.0, c# ). > I am new to postgres and for my current project I am using postgres as > database. > > > In this need functionality to upload a pdf file to database and then > retrieve it again from database. > I have taken bytea column in my table to store binary file data. I am > taking byte array to convert the data. > > When I try to retrieve this pdf file from database ,its not working. Error messages? What happens instead of what you expect to? After the save, if you examine the data in the database using psql or PgAdmin-III, what do you see? What PostgreSQL version are you using? -- Craig Ringer --------------070104080603060306030802 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 06/15/2012 09:16 PM, Vishwas Dwivedi wrote:
Greetings,

I am a software programmer and  working on a .net web application(ASP.NET 4.0, c# ).
I am new to postgres and for my current project I am using postgres as database.


In this need functionality to upload a pdf file  to database and then retrieve it again from database.
I have taken bytea column in my table to store binary file data. I am taking byte array to convert the data.

When I try to retrieve this pdf file from database ,its not working.

Error messages?

What happens instead of what you expect to?

After the save, if you examine the data in the database using psql or PgAdmin-III, what do you see?

What PostgreSQL version are you using?

--
Craig Ringer
--------------070104080603060306030802--