R: Re: CachedRowSet insertion problem with serial PK

From: "rcolmegna(at)tiscali(dot)it" <rcolmegna(at)tiscali(dot)it>
To: oliver(at)opencloud(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: R: Re: CachedRowSet insertion problem with serial PK
Date: 2006-06-03 07:27:47
Message-ID: 31906140.1149319667718.JavaMail.root@ps22
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)opencloud(dot)com>
A: rcolmegna(at)tiscali(dot)it<rcolmegna(at)tiscali(dot)it>
Cc: pgsql-jdbc(at)postgresql(dot)org
Ccn:
Ogg.: Re: [JDBC] CachedRowSet insertion problem with serial PK

rcolmegna(at)tiscali(dot)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/

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gulshan Babajee 2006-06-05 04:31:22 Information on JDBC driver src code, please help
Previous Message Bakos Sandor 2006-06-02 17:27:42 Re: UTF8