[JDBC] InsertRow problem with Serial - Mailing list pgsql-admin

From Mathias Laurent
Subject [JDBC] InsertRow problem with Serial
Date
Msg-id BAY112-F20F370AA8DD7A2EDF7BB09AA60@phx.gbl
Whole thread Raw
In response to Re: install_driver(Pg) failed: Can't load Pg.so  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-admin
Hello,

I have a problem with the driver JDBC3,
MyTable(col1(SERIAL), col2(VARCHAR), Col3(VARCHAR))

When i do

>rs.moveToInsertRow();
>rs.updateString("col2",col2);
>rs.updateString("col3",col3);
>rs.insertRow();
>con.commit();

>rs.next();
>rs.refreshRow();

The ResulSet is not refreshed for the first column, the value for col1 is 0.
  Although insertion in the base worked and the serial have the good value
!!! And this code works perfectly for MySql :(
If somebody knows when that can come from ?

Thank you,

Mathias Laurent

_________________________________________________________________
Retrouvez tout en un clin d'oeil avec la barre d'outil MSN Search !
http://desktop.msn.fr/


pgsql-admin by date:

Previous
From: Warren Little
Date:
Subject: Re: query optimization - mysql vs postgresql
Next
From: "Marc G. Fournier"
Date:
Subject: lock a database from new connections, without modifying pg_hba.conf