preparedStatement With Large Values Causes "java.sql.SQLException: Data size bigger than max size for this type"

(Doc ID 214868.1)

Last updated on AUGUST 16, 2016

Applies to:

JDBC - Version: to
This problem can occur on any platform.


When using a preparedStatement with method setObject, setString and so on and using large values, following error can occur:
java.sql.SQLException: Data size bigger than max size for this type: 4018


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms