db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veaceslav Chicu ...@infologic.fr>
Subject jdbc types
Date Thu, 02 Feb 2006 13:56:24 GMT
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

Mime
View raw message