Here is an example of the problem, in Visual Basic.NET
InvPost.Header("Items_Net").value = 13
? InvPost.Header("Items_Net").value
4.7229610327708223E+275 {Double}
[Double]: 4.7229610327708223E+275 {Double}
InvPost.Header("Items_Net").value = CType(13,Double)
? InvPost.Header("Items_Net").value
13.0 {Double}
[Double]: 13.0 {Double}
Here, Items_Net is expecting a floating point value, but when assigned with an integer, it ignores the value, and does not throw an exception. Converting the type to a double, and the code works as expected.
To avoid this, you should be familiar with the types of all the fields that you use, and to do so, you should study the schema for your particular version of Sage, as explained in this link
http://sagedataobjects.blogspot.com/2008/05/exploring-sage-data-schema.html
No comments:
Post a Comment