Problem while retrieving column size of ResultSet
Hi,
A procedure returns 300 characters of warning message(column name is 'popupwarning'). When i am retrieving the column value using getObject() method of ResultSet object it is getting only 255 characters and remaining 45 characters are missing. But procedure is correctly returning as 300 characters of warning message.I am using datasource creATED in WebSphere Application Server v6.1 to get the connection object.
below is the sample code:
Object res=rs.getObject(colName);
While debugging the code found that in res object only 255 chars are getting and remaining 45 characters are missing. Problem seems to be there may be some column length defalted to 255 chars. But i did not find where it is exactly defaulted. OR please help anyone ow to retrieve the more than 255 chars returned by database using getObject() method of ResultSet object.
Database we using is Sybase and server is WebSphere.
Thanks in Advance.
Problem while retrieving column size of ResultSet
Hi TollS,
getDisplaySize() of ResultMetaData returns the Max column length size.
Here is the problem with the Sybase JDBC2 driver. If I use Sybase JDBC3 Driver problem solves. Max column length size for this JDBC3 driver is 500 chars.
But I do not want to use the JDBC3 driver.
I need solution using JDBC2 driver. I think there are some driver settings for this character size.
Can any one help it out how these driver settings be done?
I am WebSphere Application Server v6.1