MInventory:

* db fix
This commit is contained in:
teo_sarca 2008-05-30 16:07:12 +00:00
parent d57133a358
commit bd540ac2aa
1 changed files with 7 additions and 12 deletions

View File

@ -121,28 +121,23 @@ public class MInventory extends X_M_Inventory implements DocAction
ArrayList<MInventoryLine> list = new ArrayList<MInventoryLine>();
String sql = "SELECT * FROM M_InventoryLine WHERE M_Inventory_ID=? ORDER BY Line";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement (sql, get_TrxName());
pstmt.setInt (1, getM_Inventory_ID());
ResultSet rs = pstmt.executeQuery ();
rs = pstmt.executeQuery ();
while (rs.next ())
list.add (new MInventoryLine (getCtx(), rs, get_TrxName()));
rs.close ();
pstmt.close ();
pstmt = null;
} catch (Exception e)
}
catch (Exception e)
{
log.log(Level.SEVERE, sql, e);
}
try
finally
{
if (pstmt != null)
pstmt.close ();
pstmt = null;
} catch (Exception e)
{
pstmt = null;
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
m_lines = new MInventoryLine[list.size ()];