Named query select statement throws com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range

Solved it:

AND itemCategory = ‘:itemCategory’
should instead read:
AND itemCategory = :itemCategory – no quotes

2 Likes