FastPath protocol SQLException

From: Som <shekhar(at)easi(dot)soft(dot)net>
To: Queries <pgsql-sql(at)postgresql(dot)org>
Subject: FastPath protocol SQLException
Date: 2001-01-31 12:15:25
Message-ID: 3A7801DD.530704A1@easi.soft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear All,

i am trying to insert image in postgres 7.0 by using following code:
i am getting FastPath protocol error : Z
Could any one reply earliest...?
Any feasible solution ?

PreparedStatement stmnt =conn.prepareStatement("insert into
grms_photogallary (user_id,oid) values (?,?)");
// Set parameters
String userId="soms";
stmnt.setString(1, userId);
File file = new File("/jigsaw/jigsaw/www/easilogo.gif");
InputStream photoIn=new FileInputStream(file);

int size=photoIn.available();

String str="";
for(int i=0;i<size;i++)
{
str+=(char)photoIn.read();
}
byte blobData[]=str.getBytes();
stmnt.setBytes(2,blobData);

Thanks in advance
Som

Browse pgsql-sql by date

  From Date Subject
Next Message Kovacs Baldvin 2001-01-31 12:55:59 Number of tuples to fetch
Previous Message Blaise Carrupt 2001-01-31 12:06:30 Re: interval query.