From: Som <shekhar@easi.soft.net>
To: Queries <pgsql-sql@postgresql.org>
Subject: FastPath protocol SQLException
Date: Wed, 31 Jan 2001 17:45:25 +0530
Message-ID: <3A7801DD.530704A1@easi.soft.net> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: shekhar@easi.soft.net
Subject: Re: FastPath protocol SQLException
In-Reply-To: <3A7801DD.530704A1@easi.soft.net>
References: <3A7801DD.530704A1@easi.soft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox