The given value of type SqlDecimal from the data source cannot be converted to type decimal

  • 27 December 2016
  • 1 reply
  • 41 views

Hello Guys,

 

I have created SmartObject on top of SQL table which has one column Amount with datatype as decimal(30,10) and am able to save and retrieve upto 30000000000000.0000000000 (14 digit no) from DB. When I enter Amount as 300000000000000.0000000000 (15 digit no) then I am able to save the value in DB but it throws below error while retrieving the value from DB.

 

Error:

 

The given value of type SqlDecimal from the data source cannot be converted to type decimal of the specified target column.

 

I tried with different options like changing the datatype of Amount column to decimal(38,10), decimal(38,16) etc but no luck. Any idea why I am getting this error ?

 

Thanks in Advance.

 

Regards,
Mayur

 


1 reply

Hi Mayur


 


Try on the following:


1. Run SmO Service Tester


2. Locate the SQL Service Instance the SmartObject belongs to and edit it.


3. You should see a "Database Maximum Decimal Value", and the value should be 23,9


4. Change it to 30,10 and update the service instance, refresh the SmartObject and try running it again.


 


Regards,


Mac

Reply