SQL Server 144.54 is not a valid BCD value.

Posted on 2012-09-12
Last Modified: 2012-09-12

In my Delphi application I use a SQL Server 2008 database.
Since I've updated to XE2 I have a problem with one customer which report the error:
"144.54 is not a valid BCD value"
This is also the only customer that works on Windows MultiPoint Server 2011.
It turns out that the regional settings for decimal-separator was set to "." (point) instead of a "," (comma).
In Delphi however the application sets the separator by code:

  ThousandSeparator        := '.';
  DecimalSeparator         := ',';
  // For ReportBuilder 12  -  uses ppUtils
  ppFormatSettings.DecimalSeparator  := DecimalSeparator;
  ppFormatSettings.ThousandSeparator := ThousandSeparator;

  Application.UpdateFormatSettings := False;
  // For DevExpress
  cxFormatController.UseDelphiDateTimeFormats := True;
  // change other settings of the cxFormatController...

Open in new window

Does anybody have an idea how to solve this? Is my code correct?
Question by:Delphiwizard
    LVL 25

    Expert Comment

    by:Sinisa Vuk
    Try not to set manually ThousandSeparator and DecimalSeparator. They are get from regional settings. Although, you can set in regional settings values that is needed by your application.

    ... or you can set bcd off.

    Author Comment

    Can you tell me how I can do one or the other?
    1. Set in regional settings values in my application
    2. Set bcd off
    LVL 25

    Accepted Solution


    Author Closing Comment

    Perfect. Thank you very much.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now