--- FM2SQL/Attic/DBBean.java 2004/07/09 10:26:38 1.27 +++ FM2SQL/Attic/DBBean.java 2004/08/04 11:53:08 1.30 @@ -612,8 +612,18 @@ public class DBBean // container fields try { - tableRow.addElement(new Double(resultSet.getDouble(i))); - m_columnClasses.addElement(Double.class); + Double value =new Double(resultSet.getDouble(i)); + + + // tableRow.addElement(new Double(resultSet.getDouble(i))); + String tVal =value.toString(); + tVal = tVal.substring(tVal.indexOf('.')+1); + boolean checkMe = tVal.length()==1&&tVal.equals("0"); + // System.out.println("check was"+checkMe+" "+tVal); + if(checkMe) + tableRow.addElement(new Integer(value.intValue())); + else + tableRow.addElement(value); } catch (Exception e) { @@ -1518,7 +1528,7 @@ public class DBBean ResultSet result = this.result; String subQuery = query.substring(query.lastIndexOf(table) + table.length() + 1); System.out.println("subQuery " + subQuery); - makeQuery("select " + id + " from " + getQC() + table + getQC() + subQuery, numHits); + makeQuery("select " + id + " from " + getQC() + table + getQC() + subQuery+"order by "+id, numHits); while (true) { Vector vec = getNextRow(); @@ -1545,5 +1555,26 @@ public class DBBean { useNormanToUnicodeMapper = b; } + /** + * + */ + protected void closeAllConnections() + { + Enumeration enumeration = connectionPool.elements(); + while(enumeration.hasMoreElements()) + { + ConnectionPool conPol =(ConnectionPool)enumeration.nextElement(); + try + { + System.out.println(conPol); + conPol.con.close(); + } catch (SQLException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + } } \ No newline at end of file