Subject SQL Query -> DataTruncation Exception
Author hgoettig
Hi group and fellow developers

I am having a problem with the query below. Nevermind the tricky
table aliases. It is generated by JBoss.

SELECT DISTINCT t0_u.UserId, t0_u.Name
FROM T_USER t0_u
WHERE (
t0_u.webName = ? AND
t0_u.UserName <> 'iadmin' AND
t0_u.UserName <> 'sadmin' AND
((t0_u.Name LIKE ?) OR (t0_u.EmployeeNo LIKE ?) OR (t0_u.CprNo
LIKE ?)))
ORDER BY t0_u.Name ASC

t0_u.CprNo is defined as varchar(10) and I guess it is causing the
problems.
When pass in a parameter, the "?" of a length higher than 10, say "%
searchphrase" the query fails with a data truncation exception from
Jaybird.
When I perform the query directly, using IBConsole or other clients,
it returns as expected.

I use Jaybird 1.5.0

Anyone knows why this happens?

Thanx in advance

/Henrik