Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group