RE: Connection.setBytes()

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'cs(dot)hilzingen(at)swol(dot)de'" <cs(dot)hilzingen(at)swol(dot)de>, Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: Connection.setBytes()
Date: 2000-07-19 06:54:38
Message-ID: 1B3D5E532D18D311861A00600865478CF1B0F3@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

The best point is just after you get a Connection object. ie:

conn.setAutoCommit(false);

Then when you issue any updates, you need to call conn.commit(); to commit
the changes to the database.

Peter

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council

-----Original Message-----
From: ChristophSchmidt [mailto:cs(dot)hilzingen(at)swol(dot)de]
Sent: Tuesday, July 18, 2000 8:33 PM
To: Joachim Achtzehnter; pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Connection.setBytes()

Am Die, 18 Jul 2000 schrieben Sie:
> 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

Hi,
where is the point to turn autocommit off ?
(how do you turn it off )
I am new to PREPARED STATEMENT...
Where can i find the documentation ?
How much more efficient is it ?
Is it similar to stored procedures/functions ?

cs

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 2000-07-19 06:56:21 RE: Connection.setBytes()
Previous Message Peter Mount 2000-07-19 06:47:13 RE: Connection.setBytes()