MInventoryLineMA: db fix

This commit is contained in:
teo_sarca 2008-05-30 16:10:37 +00:00
parent bd540ac2aa
commit fc9dd192a8
1 changed files with 5 additions and 12 deletions

View File

@ -43,30 +43,23 @@ public class MInventoryLineMA extends X_M_InventoryLineMA
ArrayList<MInventoryLineMA> list = new ArrayList<MInventoryLineMA>();
String sql = "SELECT * FROM M_InventoryLineMA WHERE M_InventoryLine_ID=?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement (sql, trxName);
pstmt.setInt (1, M_InventoryLine_ID);
ResultSet rs = pstmt.executeQuery ();
rs = pstmt.executeQuery ();
while (rs.next ())
list.add (new MInventoryLineMA (ctx, rs, trxName));
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
s_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;
}
MInventoryLineMA[] retValue = new MInventoryLineMA[list.size ()];