The jdbc has facilities for determining structures of tables; see java.sql.MetaData
E.g. to get field types


                       DatabaseMetaData meta = con.getMetaData();
           ResultSet rc = meta.getColumns(null, null, tableName, "%");
           ArrayList names = new ArrayList();
           while ( rc.next() ) {
               names.add(rc.getString(5)); // 5 = DATA_TYPE
           }

MySQL's DESCRIBE is easier, of course, but I've managed to get everything I need from MetaData


bw



Reply via email to