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 "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2005/09/07 23:00:58 UTC

[jira] Commented: (DERBY-213) ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network Server

    [ http://issues.apache.org/jira/browse/DERBY-213?page=comments#action_12322883 ] 

Kathey Marsden commented on DERBY-213:
--------------------------------------

New Revision: 279420

URL: http://svn.apache.org/viewcvs?rev=279420&view=rev
Log:
DERBY-213 additional checkin to rearrange tests
Moved procedure tests to lang/procedure.java so that resultset.java 
can run with J2ME
		
	

> ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network Server
> --------------------------------------------------------------------------------------------------
>
>          Key: DERBY-213
>          URL: http://issues.apache.org/jira/browse/DERBY-213
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.1.0
>     Reporter: Kathey Marsden
>     Assignee: Philip Wilder
>      Fix For: 10.2.0.0
>  Attachments: Client.java, Create.java, DERBY-213_6_13_2005.txt, DERBY-213_6_9_2005.txt, DERBY-213_irc_6_3_2005, DERBY-213_irc_6_7_2005.txt, DERBY-213_irc_6_8_2005, Derby213patch_Aug112005.patch, Derby213patch_Aug242005.patch, IRCTranscript_June2_2005.txt, ResultSet Outline.pdf, Server.java, resultset.java
>
> Network Server closes the result set if ResultSet.next() is 
> called after the last row of the result set.  The test code 
> below throws the following exception.
> SQLState:   null
> Severity: -99999
> Message:  Invalid operation: result set closed
> com.ibm.db2.jcc.am.SqlException: Invalid operation: result set 
> closed
>         at 
> com.ibm.db2.jcc.am.ResultSet.checkForClosedResultSet(ResultSet.j
> ava:3419)
>         at 
> com.ibm.db2.jcc.am.ResultSet.nextX(ResultSet.java:290)
>         at 
> com.ibm.db2.jcc.am.ResultSet.next(ResultSet.java:277)
>         at AfterLast.test(AfterLast.java:75)
>         at AfterLast.main(AfterLast.java:32)
> stmt.executeUpdate("CREATE  TABLE TAB ( I INT)");
> stmt.executeUpdate("INSERT INTO TAB VALUES(1)");
> stmt.executeUpdate("INSERT INTO TAB VALUES(2)");
> String sql ="SELECT * from tab";		
> ps = conn.prepareStatement(sql);
> ResultSet rs = ps.executeQuery();
> System.out.println(sql);
> while (rs.next())
> System.out.println(rs.getInt(1));
> try {
> 	System.out.println("one more next");
> 	rs.next();
> 		}
>     catch (Exception e)
> 		{
> 		System.out.println("FAIL: next should return false not throw 
> exception");
> 		e.printStackTrace();
> 		}

-- 
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


Re: [jira] Commented: (DERBY-213) ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network Server

Posted by Deepa Remesh <dr...@gmail.com>.
Philip, Thanks for re-arranging the tests. I verified that
resultset.java passes with J2ME/CDC/FP and can be enabled to run in
this environment. I am attaching a patch for this which just removes
"runwithfoundation=false" from resultset_app.properties.

Kathey, Since you were commiting the patches for these, it would be
great if you can look at this patch and commit it.

Thanks,
Deepa