Problems with TINYINT field v6.10.20

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DelphiProf
Posts: 3
Joined: Fri 04 Jul 2014 13:36

Problems with TINYINT field v6.10.20

Post by DelphiProf » Fri 04 Jul 2014 14:08

For a Delphi 7 application I've upgraded SDAC from 6.8.19 to 6.10.20. I use persistent fields. One of those fields (type tinyint) has per row the value 0 or 1. After the update I got errors and while debugging I encountered values existing of 5 numbers like 25856 or 30208. The result from TMSQuery in the IDE is correct, but when I got the data in a ClientDataSet (via a DataSetProvider) in a DBGrid the values are wrong. When writing to the table I get errors like "Arithmetic overflow error for data type tinyint, value = 25856" (of course).

I changed the field from tinyint to integer. Then the problem in the ClientDataSet was gone, I got in the DBGrid the values 0 and 1 as expected.

After that I went back to SDAC 6.8.19 and the tinyint field and also the problem was gone, same expected results 0 and 1.

After that I went to Delphi 2010 and build a simple test application for the same table. I managed to make persistent fields for the TMSQuery with the tinyint field, but for the ClientDataSet it was impossible to add the tinyint field as persistent field. I only could manage to make the field as persistent field when again I changed the tinyint field to an integer field.

With version 6.8.19 the tinyint fields are persistent fields of type TSmallintField (in Delphi 7 and 2010).

So it looks that something is wrong with tinyint in 6.10.20 in communication to a ClientDataSet.

Specs:
Windows 7 prof.
Delphi 7 and Delphi 2010
SDAC 6.10.20
MS SQL Server 2008 R2

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Problems with TINYINT field v6.10.20

Post by azyk » Mon 07 Jul 2014 09:16

Thank you for the information. We have reproduced this problem. We will investigate this behavior and inform you about the results.

rept
Posts: 20
Joined: Mon 30 Oct 2006 09:15
Location: Belgium

Re: Problems with TINYINT field v6.10.20

Post by rept » Wed 23 Jul 2014 23:29

I am also experiencing problems with SDAC and ClientDataSet.

What is the status on this? Is there a workaround? It's urgent for me since I need to do an update for our clients and this is blocking.

Thanks.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Problems with TINYINT field v6.10.20

Post by azyk » Fri 25 Jul 2014 09:09

We have fixed this problem. This fix will be included in the next SDAC build.

Post Reply