Re: Insert Row to ResultSet problem....java.sql.SQLException: - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Insert Row to ResultSet problem....java.sql.SQLException:
Date
Msg-id Pine.LNX.4.33.0312161408160.25487-100000@leary.csoft.net
Whole thread Raw
In response to Insert Row to ResultSet problem....java.sql.SQLException: No Primary Keys  ("Jason L. van Brackel" <jasonvanbrackel@speakeasy.net>)
List pgsql-jdbc

On Tue, 16 Dec 2003, Jason L. van Brackel wrote:

> ResultSet addressInfo = null; // ResultSet for Address Info
> sql = "SELECT * FROM address;";
> addressInfo = migr.queryStatement(migr.postgreSQLConnection, sql);
> addressInfo.moveToInsertRow();
> ..... 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)

I think the problem is the semicolon after address.  It is confusing
the driver into trying to update a table named "address;".  Either
remove the semicolon or put a space between it and the table name.

Kris Jurka


pgsql-jdbc by date:

Previous
From: "Jason L. van Brackel"
Date:
Subject: Insert Row to ResultSet problem....java.sql.SQLException: No Primary Keys
Next
From: "Jason L. van Brackel"
Date:
Subject: Re: Insert Row to ResultSet problem....java.sql.SQLException: