ArrayList<MInvoice> list = new ArrayList<MInvoice>(); String sql = "SELECT * FROM C_Invoice WHERE C_BPartner_ID=?"; PreparedStatement pstmt = null; try { pstmt = DB.prepareStatement(sql, trxName); pstmt.setInt(1, C_BPartner_ID); ResultSet rs = pstmt.executeQuery(); while (rs.next()) list.add(new MInvoice(ctx, rs, trxName)); rs.close(); pstmt.close(); pstmt = null; } catch (Exception e) { s_log.log(Level.SEVERE, sql, e); } try { if (pstmt != null) pstmt.close(); pstmt = null; } catch (Exception e) { pstmt = null; } // MInvoice[] retValue = new MInvoice[list.size()]; list.toArray(retValue); return retValue;
Jump: Email Domain Names & DNS Terms Of Service Contact Information General Discussion Configuration settings PHP - Code Java-Code SugarCRM Oracle MySQL Back to top