cjmarques
cjmarques

Reputation: 672

Anydac TADTable component collation issue

I'm having an issue with sorting strings that have special characters like ^ and ! in a Firebird database.

When using the TADTable component with the following settings and a table that uses collation unicode_ci_ai

CachedUpdates := false;
FetchOptions.Unidirectional := false;
FetchOptions.CursorKind := ckAutomatic;
FetchOptions.Mode := fmOnDemand;
FormatOptions.SortOptions := [soNoCase];

The server will put strings that start with ^ before strings that start with !, but TADTable does the opposite. This results in duplicates when bringing down the records.

I'm looking for best practice when sorting strings with special characters. I have to use TADTable (legacy system) and Live Data Window mode for speed.

Thank you.

Upvotes: 0

Views: 116

Answers (1)

Chris Reynolds
Chris Reynolds

Reputation: 5503

This is most likely to do with the database connections having different default character encoding. See Firebird Character Sets and Collations

Upvotes: 0

Related Questions