>>Getting the message 'String or binary data would be truncated.' when I try to save an updated remote view back to SQL Server.
>>
>>Only one field in the view is set to Updateable and that field is defined as decimal (15,2) in SQL Server. The view, as initially set in ViewEditor, had the field defined as N(17,2). I changed it to N(15,2) and still got the error. I also tried N(10,2) and, after Del Lee pointed out that SQL Server doesn't count the decimal in the length of the field, N(16,2). In all cases I get the same error and the table isn't updated.
>>
>>Can anyone suggest what else I should be checking?
>
>Could it be that Fox crammed a larger value, by removing decimals? It's a known artefact of xBase that it will just push the decimals out to accomodate a larger value... for instance, if you have a N(5,2) and try to store a 2999.50 into it, it will be stored as "2999.5" regardless of its two-decimal (though in my case, when I tried it in VFP9,
>
>
CREATE CURSOR nn (n n(5,2))
>APPEND BLANK
>REPLACE n WITH 2999.5
>?n
>
>returned 3000 (so it did some rounding up). Just try inserting values like 99.55, -99.52 etc to see how Fox behaves here.
>
>So, check not just the width of your view's field, but the actual number that's in it.
Thanks for the reply. In this case that's not the problem. The amount I'm trying to save is 10.47 and the field is decimal (15,2) so even if the decimal were removed the amount should fit.
Jim