SQL Server 144.54 is not a valid BCD value.

Posted on 2012-09-12
Medium Priority
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:Stef Merlijn
  • 2
  • 2
LVL 28

Expert Comment

by:Sinisa Vuk
ID: 38390307
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

by:Stef Merlijn
ID: 38390527
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 28

Accepted Solution

Sinisa Vuk earned 2000 total points
ID: 38391013

Author Closing Comment

by:Stef Merlijn
ID: 38391047
Perfect. Thank you very much.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

807 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