Update Failed: 0 Records Found when field is Numeric(18,10)

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dam54
Posts: 10
Joined: Thu 23 Jun 2011 19:26

Update Failed: 0 Records Found when field is Numeric(18,10)

Post by dam54 » Wed 02 Nov 2011 17:54

We are using MARS and receiving "Update Failed: 0 Records Found" error when we update a record that has a Numeric(18,10) datatype field. As soon as we change the field to be Numeric(18,9) the error goes away. We have experienced the same thing with datetime fields where the update SQL generated uses datetime2 instead of datetime. Because the update uses all fields and there is a difference in precision, the update fails. The table has a Primary Key and the UpdateAllFields option is set to False. Has anyone else experienced this issue and is there a fix? Thanks

AndreyZ

Post by AndreyZ » Thu 03 Nov 2011 09:45

Hello,

I cannot reproduce this problem. SDAC can use all fields for updating SQL queries in two cases: when your table doesn't have Primary Key or if the TMSQuery.Options.UpdateAllFields option is set to True. Please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com, including a script to create a table.

Post Reply