Re: About Blobs in postgresSQL

From: Leonel Nunez <lnunez(at)enelserver(dot)com>
To: kishore mukati <kishore_mukati81(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: About Blobs in postgresSQL
Date: 2005-12-21 04:59:37
Message-ID: 43A8E139.6090903@enelserver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

kishore mukati wrote:

> Hi Leonel
>
> at first thanks for help
> I try with that link you send to me
> but now I am getting a new error
> below
>
> this is exception in MyMailTracker.main()java.sql.SQLException: ERROR:
> column "attachment" is of type bytea but expression is of type integer
>
> and one more thing my postgreSQL version is 7.4 so it must support
> setBinaryStream() ;
> and
> setBytes()
> as per the postgreSQL specification
> I also tried with
> setBytes()
> but it didn't work.
>
> thanks
> regards
> kishore mukati
>
> */L/*
>

I've tested on a postgresql 7.4.8 and works fine

the error says that you are trying to store an integer on a bytea
field, that means there's a mismatch on the setBinaryStream and the
prepareStatement
check the position on the prepareStatement to match the
ps.setBinaryStream

leonel

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2005-12-21 06:14:33 Re: Newbie Question: FAQ for database optimization?
Previous Message kishore mukati 2005-12-21 04:44:12 Re: About Blobs in postgresSQL