Thread: Re: [JDBC] Insert Row to ResultSet problem....java.sql.SQLException: No Primary Keys

On 16/12/2003 15:24 Jason L. van Brackel wrote:
> [snip]
> ..... this is where I get this exception
> java.sql.SQLException: No Primary Keys                         ~~~~~~~~~~~~~~~
>     at 
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.isUpdateable(AbstractJdbc2ResultSet.java:1363)
>     at 
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.moveToInsertRow(AbstractJdbc2ResultSet.java:697)
>     at 
> com.cimconsultants.EFRMigration.MigrationUtil.main(MigrationUtil.java:62)
> [snip]
> I'm experienced with Java, but very new to JDBC and PostgreSQL.  I'm
> using the JDK 1.4, PostgreSQL 7.4, and the binary pg74jdbc3.jar
> driver.

A total shot in the dark but do you have a primary key on the table?


-- 
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller 
Business |
| Computer Consultants         | 
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+