FastPath protocol SQLException - Mailing list pgsql-sql

From Som
Subject FastPath protocol SQLException
Date
Msg-id 3A7801DD.530704A1@easi.soft.net
Whole thread Raw
List 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



pgsql-sql by date:

Previous
From: Som
Date:
Subject: Image insertion by using BLOB
Next
From: Kovacs Baldvin
Date:
Subject: Number of tuples to fetch