Subject More (perhaps) UTF8 issues
Author Robert Martin
Hi Jason

Not sure if this was one of the things we worked through or not but I
have just run into the following persistent field definition issue.

Database : FB 2.5.2
Defualt DB Character set : UTF8
Error : Query : Type mismatch for field 'Completed', expecting:
WideString actual: FixedChar

The Query field is defined as TWideStringField

The SQL for the query is the following

SELECT GlTransRef, TransDate, Ref, Detail, ExportStatus , Completed
FROM vwALLGLTrans
WHERE ExportStatus IS NULL


vwALLGLTrans is a view that is defined as follows...

CREATE VIEW vwAllGLTrans (GLTransRef, TransDate, Ref, Detail,
SEntityRef, BatchDate, BatchTime, PeriodNum, MEntityRef, PostedFrom,
BEntityRef, ImportRef, ExportStatus, Completed) AS
SELECT GLTransRef, TransDate, Ref, Detail, SEntityRef, BatchDate,
BatchTime, PeriodNum, MEntityRef, PostedFrom, BEntityRef, ImportRef,
ExportStatus, 'F'
FROM GLTrans
UNION ALL
SELECT GLTransRef, TransDate, Ref, Detail, SEntityRef, BatchDate,
BatchTime, PeriodNum, MEntityRef, PostedFrom, BEntityRef, ImportRef,
ExportStatus, 'T'
FROM GLCompletedTrans^


It appears that FB is ignoring the database default characterset (UTF8)
for the Completed field and is returning it as a fixed ansi char instead
of a fixed UTF8 char (TFixedWideChar).

I'm not sure if this is a FB fault or not.

Any ideas how to get around it?

Thanks
Rob