pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anton Bobov <bobov_a@sibsac.ru>
To: pgsql-jdbc@postgresql.org
Subject: Updatable query and column aliases
Date: Wed, 07 Mar 2012 15:10:06 +0600
Message-ID: <4F5725EE.6070503@sibsac.ru> (raw)

Hi folks.

I cant moveToInsertRow when use queries with assigned names in select
list.

Following code works good:

     stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                       ResultSet.CONCUR_UPDATABLE);
     rs = stmt.executeQuery("select id from test");
     rs.moveToInsertRow();

, but then I change query to "select id val from test" exception "The
column name id was not found in this ResultSet." raised on
moveToInsertRow.

Is it any limitation on updatable queries?

--
Anton




view thread (3+ messages)  latest in thread

Message-ID: <4F5725EE.6070503@sibsac.ru>
Permalink:  ../4F5725EE.6070503@sibsac.ru/
Also on:    postgresql.org/message-id/4F5725EE.6070503@sibsac.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: bobov_a@sibsac.ru
  Subject: Re: Updatable query and column aliases
  In-Reply-To: <4F5725EE.6070503@sibsac.ru>
  References: <4F5725EE.6070503@sibsac.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox