setMaxFieldSize(int max)

Syntax:

void setMaxFieldSize(int max)
                     throws SQLException

Description:

Sets the limit for the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object. This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, NCHAR, NVARCHAR, LONGNVARCHAR and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded. For maximum portability, use values greater than 256.

Parameters:

max

the new column size limit in bytes; zero means there is no limit

Throws:

SQLException - if a database access error occurs, if max is less than 0, or the statement has been closed.

Reference:

For more information, reference JDBC documentation for: Statement.setMaxFieldSize(int)