Received: from cda.mrs.umn.edu (root@cda.mrs.umn.edu [146.57.3.11]) by hub.org (8.10.1/8.10.1) with ESMTP id e6IJ2Xh72571 for ; Tue, 18 Jul 2000 15:02:33 -0400 (EDT) Received: from netasol.com (ctrts1-3.mrs.umn.edu [146.57.4.203]) by cda.mrs.umn.edu (8.10.0/8.10.0) with ESMTP id e6IJ2T129088; Tue, 18 Jul 2000 14:02:29 -0500 (CDT) Message-ID: <3974A9D5.DDA1509B@netasol.com> Date: Tue, 18 Jul 2000 14:02:46 -0500 From: Matt Fair Organization: Netasol Networks, Inc. X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: Joachim Achtzehnter CC: pgsql-interfaces@postgresql.org Subject: Re: Connection.setBytes() References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/125 Yes, I used con.setAutoCommit(false); Joachim Achtzehnter wrote: > On Tue, 18 Jul 2000, Matt Fair wrote: > > > > I want to set an array of bytes to a prepared statement, but it throws a > > null pointer exception. > > Did you turn off autocommit? BLOB code must run in the context of a > transaction. I believe autocommit defaults to true, so you must explicitly > set it to false and call commit at the end of your transactions. > > Joachim