Subject | Re: [Firebird-Java] Jaybird problems using hibernate |
---|---|
Author | Danny García Hernández |
Post date | 2013-10-27T19:51:55Z |
Thanks Evgeney,
I will try chance our resources api to use contains where use like.
Regards
Danny
Enviado desde mi iPhone
Hello
there is problem in sqlvar parameters structure.
'%111%' has length 5, this is more then varchar(4). Firebird (not jaybird) create internal variable length 4 for process SQL. Unfortunate it is server limitation.
You can use contains operator. for example select * from Bancos where enticed contains 111'
You can ask about this in Firebird newsgroup.
Воскресенье, 27 октября 2013, 14:29 +01:00 от Danny García Hernández <danny@...>:
Hi,
We have some problems with sql expression width params, jaybird libs throw a DataTruncation exception when params's data data overflow the field sqllen restriction. Expression width "like" using params don't work fine. Example:create table Bancos (entidad varchar(4),titulo varchar(100))select * from Bancos where enticed like ?Width param's value:1: Work OK. (select * from Bancos where enticed like '%1%')11: Work OK. (select * from Bancos where enticed like '%11%')111: ERROR. Params value is '%111%', one more character than field definition length.We are using:Jaybird. 2.2.3Jdk 1.6Hibernate: 2.2.4We use the Criteria Api to access our Backend, then for us is impossible change to use native sql without params.Any hints?.Regards
WBR Evgeny Putilin