Received: from cnri.reston.va.us (ns.CNRI.Reston.VA.US [132.151.1.1]) by hub.org (8.8.8/8.7.5) with ESMTP id SAA18957 for ; Mon, 11 May 1998 18:15:54 -0400 (EDT) Received: from rely-sun.Reston.Va.US (rely-sun [132.151.1.30]) by cnri.reston.va.us (8.8.5/8.8.7a) with SMTP id SAA05256 for ; Mon, 11 May 1998 18:17:48 -0400 (EDT) Received: from cnri.reston.va.us by rely-sun.Reston.Va.US (SMI-8.6/SMI-SVR4) id SAA27893; Mon, 11 May 1998 18:08:47 -0400 Sender: sreilly@cnri.Reston.Va.US Message-ID: <355776ED.D161D88B@cnri.reston.va.us> Date: Mon, 11 May 1998 18:08:45 -0400 From: Sean Reilly Organization: Corporation for National Research Initiatives X-Mailer: Mozilla 4.04j2 [en] (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: interfaces postgres Subject: binary insert with JDBC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Can anyone tell me how to insert binary data into a postgres table using JDBC? What type field should I use? Most importantly, how do I create an SQL statement with binary data? I thought this could be done with a PreparedStatement and setBytes() but it doesn't seem to be implemented in postgres.PreparedStatement. Is there some way to encode the binary value into the SQL string (like hex encoding or something)? I looked through the docs but couldn't find anything related to this, but it seems like it might be a common problem. Thanks, Sean