TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
martin.trummer
Posts: 19
Joined: Mon 12 May 2014 14:16

TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by martin.trummer » Tue 16 Dec 2014 10:50

Again I have a problem with the decimal separator (old forum post), but this time, the field type is set correctly. I use UniDac 6.0.1 now.

The setup is like this:
  • the operating system is set to german locale (decimal separator is ',')
  • the database used the English setup (expected decimal separator is '.')
in the uniloader the data-type of the column is set to ftExtended and in OnPutData I add an extended value
this results in the following error:

Code: Select all

#21S01Column count doesn't match value count at row 1.
I told MySQL to log all queries - as explained here and I can see that the data that is sent to the database is wrong (i.e. the ',' is used as decimal separator):

Code: Select all

141216 11:43:17	   30 Query	SELECT * FROM 1Hz WHERE 1=0
		   30 Query	INSERT INTO 1Hz (Id, `AI 1`, Channel) VALUES ('2014-12-16T11:43:17.123456', 3,1415, 1,2345)
and thus the MySQL database thinks there are too many columns

here is a simple delphi application that shows how to reproduce the error:
https://dl.dropboxusercontent.com/u/243 ... _MySQL.zip
the example also includes a text-file with the create script for the database table.

when I set the OS locale to English it works.

Please let me know if you can reproduce the issue (I can reproduce it on 2 different PCs).

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by ViktorV » Wed 17 Dec 2014 09:46

Thank you for the information. The problem investigation is in progress. We will inform you when we have any results.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by ViktorV » Tue 30 Dec 2014 09:36

We have reproduced and fixed the issue. The fix will be included in the next UniDAC build.
We plan to release the new version of UniDAC with the fixed error within 2 weeks.

martin.trummer
Posts: 19
Joined: Mon 12 May 2014 14:16

Re: TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by martin.trummer » Mon 12 Jan 2015 12:52

as a temporary workaround I installed UniDac 5.2.7

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by ViktorV » Fri 16 Jan 2015 08:50

Today we have uploaded the new version UniDAC with fixed error to our website secure.devart.com.

martin.trummer
Posts: 19
Joined: Mon 12 May 2014 14:16

Re: TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by martin.trummer » Fri 21 Aug 2015 12:24

verified that this is fixed in V6.1.6

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniLoader: UniDac 6.0.1: MySQL problem with decimal separator

Post by ViktorV » Thu 27 Aug 2015 10:33

If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply