You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/10/06 19:47:21 UTC

[jira] Closed: (DERBY-1812) getGeneratedKeys() returns something weird

     [ http://issues.apache.org/jira/browse/DERBY-1812?page=all ]

Daniel John Debrunner closed DERBY-1812.
----------------------------------------

    Resolution: Invalid

> getGeneratedKeys() returns something weird
> ------------------------------------------
>
>                 Key: DERBY-1812
>                 URL: http://issues.apache.org/jira/browse/DERBY-1812
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: java version "1.4.2-03"
> Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-03)
> Java HotSpot(TM) Client VM (build Blackdown-1.4.2-03, mixed mode)
>            Reporter: Stephan Fuhrmann
>
> After executing in embedded the cmd
> int count=stat.executeUpdate("INSERT INTO ...",Statement.RETURN_GENERATED_KEYS);
> the stat.getGeneratedKeys() returns a non-null ResultSet. The result set meta data says the result set has one column named "1".
> Calling first() on this result set throws an exception telling something about a cursor that can't be set ... I guess it's better to return FALSE in case of calling first, because the API doc of getGeneratedKeys says:
>     "Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet  object is returned."
> An empty result set would return rs.first() == false.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira