Thread: FastPath protocol SQLException

FastPath protocol SQLException

From
Som
Date:
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