|
AnyDAC
|
The class implementing custom SQLite collation.
uADPhysSQLite
Use the TADSQLiteCollation to register a custom
SQLite collation. A registered collation then may be used in any place in SQL command, where a collation may be specified. For example:
SELECT * FROM "Employees" ORDER BY LastName COLLATE UTF16NoCase
Each collation must have an unique name specified by CollationName. And one of the three collation kinds specified as the additional properties:
CompareStringW. To setup it properties use the Locale and Flags properties.After setting up the collation it must be activated using Active property. To use a collation in a SQLite connection, application must activate the collation before opening a database connection.
TADSQLiteCollation = class(TADSQLiteService);
ADSQLiteCollation1.DriverLink := ADPhysSQLiteDriverLink1; ADSQLiteCollation1.CollationName := 'UTF16NoCase'; ADSQLiteCollation1.CollationKind := scCompareString; ADSQLiteCollation1.Flags := [sfIgnoreCase]; ADSQLiteCollation1.Active := True;
See <AnyDAC>\Samples\DBMS Specific\SQLite\UserCollation
|
What do you think about this topic? Send feedback!
|