Hi All,

I have a problem retrieving the longvarchar data from database.
I am able to store the string(5,00,000 chars) using setString(colNum,
data )
method , but when i tried to retrieve the same by getString(data) it gives
the data upto 32768 chars.

I have tried with getAsciiStream method in resultset also.

here is the code

PreparedStatement pStmt = dbConnection.prepareStatement( "select " +
args[0] +" from Test" );
ResultSet rs = pStmt.executeQuery();
StringBuffer buf = null ;
if (rs.next()) {
int len=0;
byte [] bytes = new byte[33]; // a byte buffer - arbitrary
buf = new StringBuffer();
java.io.InputStream stream = rs.getAsciiStream(1);
while ( (len = stream.read(bytes)) != -1) {
buf.append(new String(bytes, 0, len));
}
System.out.println(buf.length());
System.out.println(buf);
System.out.println(buf.length());


can anyone suggest me what could be the problem

TIA