Re: Help: ResultSet..insertRow() not coping with explicit

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Help: ResultSet..insertRow() not coping with explicit
Дата
Msg-id 1064450247.1992.61.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Help: ResultSet..insertRow() not coping with explicit  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Kris,

Thanks for finding that, considering I'm the one that put that code in I
should have picked it up. Anyways, yes, the oid bit is a postgres hack
that will make updateable result sets work if you don't have a primary
key.

Dave.

On Wed, 2003-09-24 at 20:08, Kris Jurka wrote:
> On Wed, 24 Sep 2003, Jim Wright wrote:
> > ---
> > src/interfaces/jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java.~1.7.~
> > 2002-09-11 07:38:45.000000000 +0200
> > +++
> > src/interfaces/jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java
> > 2003-09-24 07:19:39.000000000 +0200
> > @@ -66,6 +66,17 @@
> >
> >              rs.close();
> >
> > +            rs = st.executeQuery( "select oid, * from updateable");
> > +
> > +            assertNotNull( rs );
> > +            rs.moveToInsertRow();
> > +            rs.updateInt( 1, 1 );
> > +            rs.updateString( 2, "jim" );
> > +            rs.updateString( 3, "4gotenit" );
> > +            rs.insertRow();
> > +
> > +            rs.close();
> > +
> >              rs = st.executeQuery("select id1, id, name, name1 from
> > updateable, second" );
> >              try
> >              {
> >
>
> Here the updateInt(1,1) is trying to update the oid column which is not
> allowed and giving the error you see.
>
> Kris Jurka
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
--
Dave Cramer <Dave@micro-automation.net>


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Help: ResultSet..insertRow() not coping with explicit
Следующее
От: Barry Lind
Дата:
Сообщение: Re: Help: ResultSet..insertRow() not coping with explicit