First i tried to update/insert records using an updateable resultset using a
table as datasource, that works just fine.
My application requires to do updates also to views which are created about as
create view sometable_update as Select * from sometable;
create rule sometable_update_rule as on update to sometable_update do instead
update sometable set ...;
Updating to sometable_update does work if i type an update statement myself.
However, using code like this:
ResultSet urs=stmt.executeQuery("SELECT * FROM sometable_update");
results in an SQLException "no primary keys".
Basically i assume, that this happens because the driver is not able to detect
the primary keys of a view, which is mainly because postgres stores views in
a completly different way as tables.
Is there a way to tell the driver the primary keys manually (as i know them at
this point in my code) for a certain ResultSet/Statement or another solution
to this problem?
If possible i would like to avoid creating my own insert/update-Strings and
let it do the driver.
pgsql-jdbc by date
|Next:||From: Kris Jurka||Date: 2004-03-11 13:00:23|
|Subject: Re: updateable resultset only working for tables?|
|Previous:||From: Markus Schaber||Date: 2004-03-11 12:27:22|
|Subject: Re: Register arbitrary types Framework|