I can confirm this: my application happily inserts CLOB data well over the 32K using JPA
On Mar 24 2023, at 5:38 am, Stanimir Stamenkov via derby-user <derby-user@db.apache.org> wrote: > Thu, 23 Mar 2023 14:54:50 -0600, /Russell Bateman/: > > > In fact, experimentation seems to suggest that the breaking point is a > > length of 32K+. > > This seems to match the VARCHAR and LONG VARCHAR specifications: > * https://db.apache.org/derby/docs/10.16/ref/rrefsqlj41207.html > * https://db.apache.org/derby/docs/10.16/ref/rrefsqlj15147.html > > This happens to be the string literal in your INSERT statement. If you > want to insert more than 32K in your CLOB column you would need to use > the JDBC interfaces: > > * > https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/PreparedStatement.html#setCharacterStream(int,java.io.Reader,int) > * > https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/PreparedStatement.html#setClob(int,java.io.Reader,long) > > and for reading: > * > https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/ResultSet.html#getCharacterStream(int) > * > https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/ResultSet.html#getCharacterStream(int) > > – Stanimir > > > On 3/23/23 13:02, Russell Bateman wrote: > > > >> According to what I'm reading, a CLOB should easily hold more than the > >> 128K I'm trying to put into it. > >> > >> [...] > >> My insert string: > >> > >> INSERT INTO ssdi_small_tbl( MsgContent, MsgReceived, MsgSource, > >> MsgFacility, MsgType1, MsgType2, MsgAltId1, MsgAltId2, MsgMisc1, > >> MsgStatus, MsgStatusDate, MsgStatusInfo ) > >> VALUES( > >> '<?xml version="1.0" encoding="UTF-8"?> > >> <ClinicalDocument xmlns="urn:hl7-org:v3" > >> xmlns:sdtc="urn:hl7-org:sdtc"... > >> ...about 128K of well formed XML... > >> /<ClinicalDocument> > >> ', > >> [...] > > --