I'm having a problem in our application where I save a monetary value and want to result to have two decimal places. The money data type always uses four so I'm thinking of using something like a decimal (18,2). Does anyone have any suggestions?
Which DB type are you using? Though I think a decimal will do better in this case. I think money uses 4 decimals on some db's to overcome rounding issues in signicant digits.
Maybe I'm asking if there is anyway to make a custom money type uses only two decimal places instead of four. I think I'll probably end up using the decimal (18,2) for this as the size I'm not concerned with right now.
Some DB's support custom data types, which are useful in exactly your scenario. You could create a custom data type in SQL Server called "currency" (not sure if that's a reserved word) as decimal(18,2). Then your columns would be of type "currency" and you could later change the custom data type if necessary.
I store a value on SQL Server 2005 as decimal(12,2). The number returned to me is a single and has a 3rd decimal changing "xxx.37" to "xxx.375". Can you point me to the area of LLBLGen Pro where I can stop that behavior? It causes issues with rounding.