Apache OpenOffice (AOO) Bugzilla – Issue 14237
A resultset should hold the creator statement alive
Last modified: 2006-05-31 14:29:06 UTC
Suppose follwing code, ResultSet createResult() { Statement stmt = con.createStatement(); return stmt.executeQeury("..."); } In the current implementation the resultset will bve invalid because the statement will be destroxed and the end of scope. But this a common use for resultset creation and should be changed.
changed to OO2.0
change subcomponent to 'none'
.
Fixed in cws insight01.
reopen
reassign to fs
is issue is fixed in cws insight01 , can you please verify this. Thanks Marc
verified in CWS insight01 with the following macro: Sub Main oContext = createUnoService( "com.sun.star.sdb.DatabaseContext" ) oDataSource = oContext.getByName( "Bibliography" ) oConnection = oDataSource.getConnection( "", "" ) oStatement = oConnection.createStatement( ) oResultSet = oStatement.executeQuery( "SELECT * FROM biblio" ) ' just to release the reference to the statement which just created the result set oStatement = oConnection.createStatement oColumn = oResultSet.getColumns().getByName( "Identifier" ) Dim sIdents as String While ( oResultSet.next() ) sIdents = sIdents + oColumn.getString() + chr(13) Wend MsgBox sIdents oConnection.dispose End Sub
fix verified in 680 m66