Get UNSIGNED attr for BIGINT in MySQL

From: RichCreamer (RichCreamer.17x7q5_at_mail.codecomments.com)
Date: 06/15/04


Date: Tue, 15 Jun 2004 16:06:23 -0500


I need to use java.sql.DatabaseMetaData to discover if a table column is
signed or unsigned. Specifically, MySQL BIGINT UNSIGNED types. I was
reading post: http://tinyurl.com/3d4jk in which they indicated MySQL
JDBC support was enhanced so that the UNSIGNED attribute was included
in a column's TYPE_NAME (field 6 of
java.sql.DatabaseMetaData.getColumns() result set). But I am not
finding this to be the case for MySQL 4.1 and the latest Connector/J.
Is there any JDBC method for determining if a numeric type is
signed/unsigned via the java.sql.DatabaseMetaData interface? I saw
that java.sql.ResultSetMetaData has an isSigned( int column ) method
but this seems only useful for when reading data. But I need to
capture the metadata for the DBMS whether or not a table has data in it
which can be read. Any help would be appreciated.

--
RichCreamer
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------