> That's right we *can't change the spec*.
>
> But hold on guys, I can put a try catch block for this and prevent
> the SQLException from being thrown in the implementation,
> wherever it is being called in from *other classes*.
> And hence we can go on.
>
> But yes I can't change the spec class from doing that.
> It's(return -1 for variable length data) is used by various JDBC drivers
> that way.
>
> Does that help ?
Method
javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize()
throws exception after it is called from:
com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:679)
If you catch exception in CachedRowSetImpl.java, you have to decide what
value
to put in columnDisplaySize property. Possible answer is:
If columnDisplaySize, precision or scale property of ResultSetMetaData is -1
then appropriate property of RowSetMetaDataImpl will be 0.
(and you don't need try/catcher to do that)
If various JDBC drivers use -1, this may be reasonable solution.
Nebojsa