Closed firebird-automations closed 12 years ago
Commented by: @dyemanov
Binary blobs don't have charsets or collations. In v2.5.0 and before, your example described the parameter as VARCHAR. Staring with v2.5.1, it's described as a blob with the same characteristics as the field being compared to, i.e. a binary blob. It is intentional, see CORE3353. So you have to either specify the string type and charset explicitly (cast or whatever) or, much better, use text blobs for strings instead of binary blobs.
Commented by: Sean Leyne (seanleyne)
Collations will never be applicable for binary blobs
Submitted by: Richard Stekly (rs.)
database created with charset WIN1250, logged in with default charset WIN1250
table MY_TABLE - MY_FLD blob subtype 0;
working SQL: select * from MY_TABLE where MY_FLD starting with 'kůň' wrong SQL: select * from MY_TABLE where MY_FLD starting with :MY_PARAM PAS code: IBSQL.Prepare; IBSQL.Params[0].asString:='kůň'; IBSQL.ExecQuery;
in 250 returns matching records, in 251 returns nothing. When token 'kůň' is changed to 'horse', it works fine. Workaround is: select * from MY_TABLE where MY_FLD starting with cast(:MY_PARAM as varchar(4096)) I mean it do'nt use charset from login for parameters or works with MY_PARAM binary as-is.