Subject Re: [Firebird-Java] Re: Query returning incorrect data
Author Mark Rotteveel
> I suspect this is not a bug, but some inconsistency because of unicode
> > use... What is your JDBC URL/connection properties for Jaybird?
> We use DriverManager.getConnection('our connection string', props),
> where props contains:
> props.put("user", aUsername);
> props.put("password", aPassword);
> props.put("encoding", "UNICODE_FSS");
> props.put("charSet", "UTF8");

> That last property 'charSet' seems out of place to be setting it to
> 'UTF8', but that seemed to be the only thing that worked for us
> (props.put("charSet", "UNICODE_FSS") didn't work correctly)... and all
> our 'normal' queries work just fine !?!

This is not strange, but the way it should be set. The charSet property accepts the Java equivalent of the characterset (and Jaybird then determines the equivalent Firebird characterset). If you want to explicitly set the database characterset, use the property encoding. See also

> > Also you can try
> >
> > select (case when status=1 then _UNICODE_FSS 'Yes' else _UNICODE_FSS
> > 'No' end) as FlagStr from mytable
> Unfortunately that did not work...

Could you provide a SSCCE (Short, Self-Contained, Compilable Example) of the code you use to do the query and retrieve the results?
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 EURO/mtl.!*