diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index 76a18bd65c2a..3ed7f3b699ee 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -20,6 +20,7 @@ package com.sun.star.wizards.db; import java.util.ArrayList; import com.sun.star.sdbc.SQLException; +import com.sun.star.sdbc.XCloseable; import com.sun.star.sdbc.XResultSet; import com.sun.star.sdbc.XRow; import com.sun.star.uno.UnoRuntime; @@ -65,6 +66,11 @@ public class RelationController extends CommandName CommandName oCommandName = new CommandName(getCommandMetaData(), sForeignCatalog, sForeignScheme, sForeignTableName, false); aReferencedTableVector.add(oCommandName.getComposedName()); } + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xResultSet); + if (xCloseable != null) + { + xCloseable.close(); + } sReferencedTableNames = new String[aReferencedTableVector.size()]; aReferencedTableVector.toArray(sReferencedTableNames); } @@ -130,6 +136,11 @@ public class RelationController extends CommandName } } + XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, xResultSet); + if (xCloseable != null) + { + xCloseable.close(); + } sKeyColumnNames = new String[2][aMasterFieldNamesVector.size()]; sKeyColumnNames[0] = new String[aSlaveFieldNamesVector.size()]; sKeyColumnNames[1] = new String[aMasterFieldNamesVector.size()];