Unknown locale identifier error

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 7
Joined: Wed 08 Oct 2008 17:48

Unknown locale identifier error

Post by maurix » Thu 23 Feb 2012 19:19

I use the TMSCompactConnection object to connect to a SQLServer compact 3.5 database.
At runtime, when the application connect the database I receive the following exception message:

Error reading MSConnection1.Options.LocaleIdentifier: Unknown locale identifer

The MSConnection1.Options.LocaleIdentifier is set to my default Locale Identifier which is Italian, but as soon as I run the application on a OS with different language I receive the above error.

I even tried to set the MSConnection1.Options.LocaleIdentifier to the LCID of the host computer before connecting the database without success.

Please can you help me?

Posts: 7
Joined: Wed 08 Oct 2008 17:48

Post by maurix » Fri 24 Feb 2012 15:22

I found that the problem depends on what is written in the .dfm file of the datamodule that contains the TMSCompactConnection object.

The LocaleIdentifier property is saved into the DFM file and raises the exception when the application start in a OS operating system with a locale identifier different from the one saved into the DFM.

DFM file content:

object MSConnection1: TMSCompactConnection
Options.LocaleIdentifier = 'Italiano (Italia)'
OnError = MSConnection1Error
LoginPrompt = False
Left = 464
Top = 32

Before installing the latest SDAC version the Options.LocaleIdentifier was never written into the .DFM and the error didnt'occur.

To bypass the problem I need to delete the "Options.LocaleIdentifier = 'Italiano (Italia)' "row in the DFM manually before compiling.

Please can you tell if this problem is really depending on DevArt and not on something wrong on my Delphi XE IDE?



Post by AndreyZ » Mon 27 Feb 2012 12:43

We already fixed the problem with the LocalIdentifier property. This fix will be included in the next SDAC build. We are going to release SDAC this week.

Post Reply