tobenschain 0 Posted January 17, 2023 Using FireDAC i created a Fire Bird table. I use Next command to go through the entire file of 6,000 records. The keys essentially go like this: 'B040' 'B060' 'B070' 'Xƒ0000' 'Xƒ0010' 'Xƒ0020' 'X‡62170' 'X‡62180' 'X‡62190' 'Xˆ001' 'Xˆ002' 'Xˆ003' For some reason the Next command pulls up 'Xƒ0000' for a second time after 'X‡62190'. Are extended ASCII codes allowed? Share this post Link to post
programmerdelphi2k 237 Posted January 18, 2023 using any specific Charset or Collate on field? Share this post Link to post
Serge_G 87 Posted January 18, 2023 Using Charset NONE is a regrettable habit ! I still have some database with this default encoding and migration to best encoding is not so easy, no easy tool for this ! Try to use WIN1252 as fdconnexion charset Share this post Link to post
programmerdelphi2k 237 Posted January 19, 2023 (edited) you can specify "CHARSET and COLLATE": in you "connection string" for all usage (CHARSET/COLLATE ) or in "select, insert, update" on fields (CHARSET/COLLATE) on in your index creation or in "order by" (CHARSET/COLLATE) ex.: select myfield COLLATE <<your collation>> from table where myfieldx COLLATE <<your collation>> = 'ABC' order by myfieldY COLLATE <<your collation>> etc... you see? Quote on Firebird documentation Collation Sequence Each character set has a default collation sequence (COLLATE) that specifies the collation order. Usually, it provides nothing more than ordering based on the numeric code of the characters and a basic mapping of upper- and lower-case characters. If some behaviour is needed for strings that is not provided by the default collation sequence and a suitable alternative collation is supported for that character set, a COLLATE collation clause can be specified in the column definition. A COLLATE collation clause can be applied in other contexts besides the column definition. For greater-than/less-than comparison operations, it can be added in the WHERE clause of a SELECT statement. If output needs to be sorted in a special alphabetic sequence, or case-insensitively, and the appropriate collation exists, then a COLLATE clause can be included with the ORDER BY clause when rows are being sorted on a character field and with the GROUP BY clause in case of grouping operations. Edited January 19, 2023 by programmerdelphi2k Share this post Link to post
Serge_G 87 Posted January 19, 2023 I was thinking this way, even if I don't know it could solve your problem 1 Share this post Link to post