create table A (a varchar(4));
Now if we create a prepared statement (ultimately I want to do this from Java) such as
prepare select * from A where a = ?;
we can execute the statement and supply 4 characters as the argument:
exec 3('1234');
This works fine. However, if I am using an Umlaut within the parameter, then things don't work out. For example
exec 4('ä123');
fails with the following error message
EXEC: wrong type for argument 1 of prepared statement: char, expected varchar
However, if I now shorten the parameter by "1" character, it works again. That is,
exec 5('ä12');
is ok.
Can anybody explain this behavior? Is this a bug? And is there a workaround? The only thing I came up with so far is to double the size of every column.
Best regards,
Arno