Advantage Database Index Collation Sequence

2019-02-26 20:29发布

问题:

I am converting a Delphi program from the BDE to Advantage Database.

On weekends I work on a Win 7 machine using Delphi XE. During the week I work on a Win XP machine using Delphi 7.

Advantage tables work fine on the Win 7 machine but when copied to the XP machine they cannot be accessed - Error 5175 the index was created with a different collation sequence

I have searched the net, even gone into the Advantage forums but can't find anything helpful.

The XP and Win 7 are both set up the same as regards location etc. Table properties lists the collation sequence as blank.

Anyone know what is causing this and how to fix. I have tried dropping and recreating the indices but to no avail.

回答1:

The collation sequence that is used to create or open index files depends on what collation sequence is configured for the remote server or local server you are connecting to.

For Advantage Local Server (ALS) this can be set in the adslocal.cfg config file.

The dedicated Advantage Database Server (ADS) has to be reinstalled in order to change the collation, since the installer "bakes" the collation into the server executable (at least as far as I know).

In addition to that the collation is different on different OS versions and OS languages if you select <CURRENT SYSTEM LANGUAGE> (or similar) when you install the ADS components. This is described in the help:

  1. This first option is strongly recommended and is the easier method to make sure the ANSI collation languages are the same for all connections. Specifically select an ANSI collation language when installing the Advantage Database Server and Advantage clients. Make sure to specify the same ANSI language for all installs. The ANSI collation language selected during an Advantage client install will be placed in the Advantage Local Server configuration file, ADSLOCAL.CFG.
  2. If you do not wish to use option 1 above, select for the ANSI collation language when installing the Advantage Database Server and the Advantage clients. Only select if all of the following are True. All computers used for installation of the Advantage Database Server should be running the same Windows operating system. The computer running an application that connects to the Advantage Local Server should also be running this same OS. In addition to the operating systems being the same, all computers should be using the same ANSI collation language (which is specified via the Regional Settings icon).

http://devzone.advantagedatabase.com/dz/webhelp/advantage10/master_avoiding_ansi_collation_mismatch_errors.htm

http://devzone.advantagedatabase.com/dz/webhelp/advantage10/index.html?error_5175_ae_index_collation_mismatch.htm