Re: Fetching generated keys

From: "Mike Clements" <mclement(at)progress(dot)com>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>, "PostgreSQL JDBC List" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Fetching generated keys
Date: 2007-03-09 21:44:57
Message-ID: 626C0646ACE5D544BC9675C1FB81846B338A22@MAIL03.bedford.progress.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

It is version 8.2.1. But I realized my error was quite silly. The
intermittent problem was that the expression evaluator in my debugger
had the expressions "rs.first()", "rs.next()" etc. So the moment the
code hit my breakpoint the expressions were invoked which broke the
result set before my code got a chance to use it. I didn't see this
because the expression window was minimized :(

Now it's working great.

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of A.M.
Sent: Tuesday, March 06, 2007 4:34 PM
To: PostgreSQL JDBC List
Subject: Re: [JDBC] Fetching generated keys

On Mar 6, 2007, at 18:35 , Mike Clements wrote:

> Kris,
>
> I wrote a simple test program and schema but I can't reliably
> reproduce the problem. The problem I'm seeing is intermittent. When
> calling
> next()
> on the result set, it sometimes throws an exception saying the DB
> connection has been closed. Of course it hasn't been closed, but the
> problem is now so intermittent I can't reliably reproduce it.
>
> If I end up being able to reproduce it consistently I'll post the
> sample code.

You may be crashing the server. Which server version is this?

-M

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2007-03-09 23:32:33 Re: Error while retrieving generated keys
Previous Message Mike Clements 2007-03-09 21:40:11 Re: Error while retrieving generated keys