Hi All,
I've a problem with JDBC and ResultSetMetaData interface.
I'would know the length of a char or varchar column.
Here's my code :
ResultSet res = stmt.executeQuery("select * from x");
ResultSetMetaData rmtd = res.getMetaData();
for ( int i = 1 ; i <= rmtd.getColumnCount();i++)
{
System.out.println("col "+i+ " : type = " + rmtd.getColumnTypeName(i)
+ ", length = " + rmtd.getScale() );
}
With numeric type, it's ok. But with char, getScale() return 0 and
getPrecision() : return 0.
Can anyone help me ?
Thanks in advance.
Jean-Yves Beaujean
Service informatique
CORMAN S.A.
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________