Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting the column witdth

amarshi mohanty
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In the resultsetmetadata object , we have getColumnDisplaySize(),but there is no method to set.
setColumnDispalySize() method is present in RowSetMetadata().
In my case i have to populate the CachedRowset with Resultset.The width of a paticular column is varchar(65) in postgresql,but in the java side this is coming as -5.
So i have to re-set the width size before populating to CachedRowset,otherwise i am getting

java.sql.SQLException: Invalid column display size. Cannot be less than zero

Please suggest me.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic