Error Invalid data type for setstring

LibreOffice Base 6.3 using Firebird.
I have a table “Gezinnen” with 3 columns:

gezinsid int autonum primary key
title varchar
huwelijksdatum date

I can do a query succesfully:

 select gezinsid, titel, extract(month from huwelijksdatum) from Gezinnen (with the appropriate "'s)

But when I do

select gezinsid, titel, extract(month from huwelijksdatum) from Gezinnen where extract(month from huwelijksdatum)=:mndnr

The dialogue box for the input appears, but no matter how I try to format the answer, I get the error HY004 Invalid data type for setString.
I know this error comes from firebird, but how can I get rid of this problem?
I tried to save the first select as a query and then open a second query with the first as its source and just add the input parameter, but the error remains the same.

Edited for clarity - @Ratslinger


In testing this can be duplicated. If parameter is replaced with a value the statement works. Must be a bug with parameter usage.

I can get to work with the following SQL:

Select gezinsid, title, ext_month From (select gezinsid, title, Cast(extract(MONTH from huwelijksdatum) as varchar(2)) as ext_month from Gezinnen) where ext_month = :mndnr

You may want to report the error → Bugzilla

Note: Do not enter leading zero for month in parameter entry where it is a single digit - January = 1 for parameter not 01.

Can probably adjust SQL if needed.

Bug 127657 submitted.

I never used leading zero’s, so that’s not the point.
In the mean time I tried to cast the month expression to varchar(2) and then the query works.
So I’ll write a bug on this issue soon.