R: Re: CachedRowSet insertion problem with serial PK - Mailing list pgsql-jdbc

From rcolmegna@tiscali.it
Subject R: Re: CachedRowSet insertion problem with serial PK
Date
Msg-id 31906140.1149319667718.JavaMail.root@ps22
Whole thread Raw
List pgsql-jdbc
Hi,

I noticed that I have committed an error: the excpetion isn't raised
from JDBC
driver but from CacheRowSetImpl. I will send a post to sun-maillist.

Exception in thread "main" java.sql.SQLException: Failed on insert row
        at com.sun.rowset.CachedRowSetImpl.insertRow(CachedRowSetImpl.
java:5440)
        at CachedRowSetDemo.test(CachedRowSetDemo.java:78)
        at CachedRowSetDemo.main(CachedRowSetDemo.java:90)

TIA
Roberto Colmegna


---- Messaggio originale ----
Data: Fri Jun 02 17:47:10 CEST 2006
Da: Oliver Jowett<oliver@opencloud.com>
A: rcolmegna@tiscali.it<rcolmegna@tiscali.it>
Cc: pgsql-jdbc@postgresql.org
Ccn:
Ogg.: Re: [JDBC] CachedRowSet insertion problem with serial PK

rcolmegna@tiscali.it wrote:

>     CachedRowSet rs;
>     ...
>     rs.setCommand("select id,info from a WHERE id<?");
>     rs.setInt(1, 10);
>     ...
>     rs.moveToInsertRow();
>     rs.setString(2, "zzzz2");
>     rs.insertRow();
>
> but I obtain this error:
> "SQLException: Failed on insert row" (generated from the insertRow()

> line).

Can you work out what the real exception thrown by the driver is? It
is
hard to diagnose this without knowing what is happening at the low-
level
JDBC API level.

-O

---------------------------(end of broadcast)
---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org






La gara più entusiasmante dell'anno!

Gioca e corri alla velocità della luce sui 18 circuiti di Intel Speed Contest 2006!

I più bravi vincono Notebook Sony VAIO, iPod da 60 GB e altro ancora...

Sfida gli amici!

http://intelspeedcontest2006.tiscali.it/


pgsql-jdbc by date:

Previous
From: Bakos Sandor
Date:
Subject: Re: UTF8
Next
From: "Gulshan Babajee"
Date:
Subject: Information on JDBC driver src code, please help