--- FM2SQL/Attic/DBBean.java 2004/02/12 13:02:56 1.9 +++ FM2SQL/Attic/DBBean.java 2004/03/23 11:57:06 1.11 @@ -1,3 +1,17 @@ +/* + * DBBean.java -- Class that ecapsulates all database actions + * Filemake to SQL Converter + * Copyright (C) 2004 Robert Gordesch (rogo@mpiwg-berlin.mpg.de) + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. Please read license.txt for the full details. A copy of + * the GPL may be found at http://www.gnu.org/copyleft/lgpl.html You should + * have received a copy of the GNU General Public License along with this + * program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA Created on 15.09.2003 by + * rogo + */ import java.sql.*; @@ -1226,8 +1240,17 @@ public class DBBean // m_columnClasses.addElement(String.class); } // to catch - } else if (metaData.getColumnType(i) == Types.DATE) - { + } else if (metaData.getColumnType(i) == Types.INTEGER) + { + // use the ResultSet.getObject method for retieving images + // from FileMaker Pro container fields; the ResultSet.getObject + // method returns a java.awt.Image object for FileMaker Pro + // container fields + + tableRow.addElement(new Integer(resultSet.getInt(i))); + // m_columnClasses.addElement(java.sql.Date.class); + } else if (metaData.getColumnType(i) == Types.DATE) + { // use the ResultSet.getObject method for retieving images // from FileMaker Pro container fields; the ResultSet.getObject // method returns a java.awt.Image object for FileMaker Pro @@ -1372,7 +1395,7 @@ public class DBBean t.add(vec.get(0)); } this.result=result; - metaData = this.result.getMetaData(); + metaData = (this.result==null) ?null:this.result.getMetaData(); return t; }