db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: updatable resultSet
Date Wed, 05 Oct 2005 21:26:54 GMT
Veaceslav Chicu <cs@infologic.fr> writes:

> Hello,
>
> why this is not working?
> PreparedStatement st = conn.prepareStatement("select person_id,
> name, surname from tiers.person for update",		
> ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
> ...
> rs.setObject(1, "aaa");
> rs.updateRow();
>
> in embeded mode?

Derby only supports forward-only updatable result sets. If you don't
need a scrollable result set, try the following:

  conn.prepareStatement("select ... for update",
                        ResultSet.TYPE_FORWARD_ONLY,
                        ResultSet.CONCUR_UPDATABLE);

-- 
Knut Anders


Mime
View raw message