MInventoryLineMA: db fix
This commit is contained in:
parent
bd540ac2aa
commit
fc9dd192a8
|
@ -43,30 +43,23 @@ public class MInventoryLineMA extends X_M_InventoryLineMA
|
||||||
ArrayList<MInventoryLineMA> list = new ArrayList<MInventoryLineMA>();
|
ArrayList<MInventoryLineMA> list = new ArrayList<MInventoryLineMA>();
|
||||||
String sql = "SELECT * FROM M_InventoryLineMA WHERE M_InventoryLine_ID=?";
|
String sql = "SELECT * FROM M_InventoryLineMA WHERE M_InventoryLine_ID=?";
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pstmt = DB.prepareStatement (sql, trxName);
|
pstmt = DB.prepareStatement (sql, trxName);
|
||||||
pstmt.setInt (1, M_InventoryLine_ID);
|
pstmt.setInt (1, M_InventoryLine_ID);
|
||||||
ResultSet rs = pstmt.executeQuery ();
|
rs = pstmt.executeQuery ();
|
||||||
while (rs.next ())
|
while (rs.next ())
|
||||||
list.add (new MInventoryLineMA (ctx, rs, trxName));
|
list.add (new MInventoryLineMA (ctx, rs, trxName));
|
||||||
rs.close ();
|
|
||||||
pstmt.close ();
|
|
||||||
pstmt = null;
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
s_log.log (Level.SEVERE, sql, e);
|
s_log.log (Level.SEVERE, sql, e);
|
||||||
}
|
}
|
||||||
try
|
finally
|
||||||
{
|
{
|
||||||
if (pstmt != null)
|
DB.close(rs, pstmt);
|
||||||
pstmt.close ();
|
rs = null; pstmt = null;
|
||||||
pstmt = null;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
pstmt = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MInventoryLineMA[] retValue = new MInventoryLineMA[list.size ()];
|
MInventoryLineMA[] retValue = new MInventoryLineMA[list.size ()];
|
||||||
|
|
Loading…
Reference in New Issue