You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Veaceslav Chicu <cs...@infologic.fr> on 2006/02/02 14:56:24 UTC

jdbc types

Hello,

I have a question:
I have a resultSet, how can I find max, min values for an INTEGER
column? or DECIMAL?

I want to not allow a user to introduce wrong data:

ResultSetMetaData rsmd = rs.getResultSetMetadata();
editor = new JFormattedTextField();
formatter = new NumberFormatter(NumberFormat.getIntegerInstance());
formatter.setMinimum(rsmd.get???);
formatter.setMaximum(rsmd.get???);
editor.setFormatterFactory(new DefaultFormatterFactory(formatter));

any idea? workaround?

maybe I should look in DatabaseMetaData.getTypeInfo() which field?

best regards,
Slavic