#345 JDBC Property "data truncation" doesn't work for LOB columns.


If you set the JDBC property "data trucation" to "false" it is ignored for LOB columns.

When executing the attached class LobDataTruncationTest you will get a java.sql.SQLDataException with the sql error code SQL0311.

  1. The test class creates a table.
    create table LOBTest (
    OID vargraphic(32) allocate(32) ccsid 1200 not null,
    remarks dbclob(7000) allocate(2048) ccsid 1200,
    primary key (OID)
  2. It trys to inserts a row with a String of 7001 characters for column "remarks".
  3. It drops the table.

The insert (2) doesn't work and you will get the exception mentioned above. If the data type of column "remarks" is a VARGRAPHIC or VARCHAR it works.

1 Attachments


  • John Eberhard

    John Eberhard - 2013-08-13
    • assigned_to: John Eberhard
  • John Eberhard

    John Eberhard - 2017-04-17
    • status: open --> closed-out-of-date
  • John Eberhard

    John Eberhard - 2017-04-17

    Closing old bug. Please re-open for us to look at again.

  • Mattias Neuling

    Mattias Neuling - 2017-04-18

    The bug still exists. If you use DBCLOB or CLOB columns the JDBC property "data trucation" will be ignored and an exception occurs if the character count exeeds the column definition.

    Please re-open this ticket since I have no permission to do that.

  • John Eberhard

    John Eberhard - 2017-04-18
    • status: closed-out-of-date --> open

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks