Subject Like on BLOB limited to 28 characters in prepared statement
Author Robert DiFalco
Check this out....

If I do a LIKE search on a blob I have no problems. However, if the
search criteria is greater than 28 characters I get a Data Truncation
exception. However, the "same exact" search, succeeds in IBExpert. This
is the exception trace:

com.tripwire.space.core.SpaceException: Data truncation
java.sql.DataTruncation: Data truncation
at
org.firebirdsql.jdbc.FBStringField.setString(FBStringField.java:291)
at
org.firebirdsql.jdbc.FBPreparedStatement.setString(FBPreparedStatement.j
ava:211)
at
com.tripwire.space.core.persistence.db.StatementStream.setString(Stateme
ntStream.java:125)
at
com.tripwire.space.core.persistence.db.SelectCriteria$3.write(SelectCrit
eria.java:675)
at
com.tripwire.space.core.persistence.db.SelectCriteria$Conditions.write(S
electCriteria.java:587)
at
com.tripwire.space.core.persistence.db.QueryContext.count(QueryContext.j
ava:77)
at
com.tripwire.space.core.persistence.db.QueryContext.search(QueryContext.
java:152)
at
com.tripwire.space.core.persistence.db.DatabaseProxy.select(DatabaseProx
y.java:156)
at
com.tripwire.space.core.persistence.PersistenceMapping.select(Persistenc
eMapping.java:496)
at
com.tripwire.space.core.persistence.ConcreteSearch.perform(ConcreteSearc
h.java:122)


Just try doing a " LIKE " on a blob where the right hand side of the
like is greater than 28 characters. Containing works fine.

Thoughts?

R.