Well I do not exactly whats wrong since you have not given us the table schema, but have you tried just printing the value returned by rsmd.getColumnType(1) .
Although just for the record I do not see why it should be different from one given by rsmd.getColumnTypeName(1)
stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154
Debug the code to find the actual type number returned and what it equates to. If you don't know how to use the debugger then print out the varying types at the top of the method as follows
System.out.println("Integer TYPE: " + Types.INTEGER);
System.out.println("Float TYPE: " + Types.FLOAT);
...
Then, just before the switch do
System.out.println(rsmd.getColumnType(1));
And see what that equates to.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494