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

Updatable query and column aliases

From: Anton Bobov <bobov_a(at)sibsac(dot)ru>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Updatable query and column aliases
Date: 2012-03-07 09:10:06
Message-ID: 4F5725EE.6070503@sibsac.ru (view raw or flat)
Thread:
Lists: pgsql-jdbc
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


Responses

pgsql-jdbc by date

Next:From: Michael BaulandDate: 2012-03-07 16:20:08
Subject: Defining local IP address when opening connections to database
Previous:From: Francisco Javier Morosini EgurenDate: 2012-03-07 02:00:54
Subject: PgNotificationHelper

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