I am currently studying the New Database Table Pattern - is there any general guidance for cases where a table needs a currency-related column? Is it OK to use the decimal type? Looking at various OpenDentBusiness TableTypes it seems double is used where an amount in money is to be stored.
I have only just started looking at this so will reply to my own post if I find anything ...but I'm interested if anyone has suggestions of what to look at or consider...
Thanks!
(see: http://www.opendental.com/manual/patter ... table.html)
New Database Table Pattern
-
- Posts: 12
- Joined: Tue Apr 09, 2013 12:24 pm
New Database Table Pattern
Last edited by jackcraig66 on Mon Jun 17, 2013 8:51 am, edited 1 time in total.
-
- Posts: 12
- Joined: Tue Apr 09, 2013 12:24 pm
Re: New Database Table Pattern
...found that the Crud Generator doesn't support the decimal type - see extract from exception below
Code: Select all
System.ApplicationException was unhandled
...
Message=Type not yet supported: Decimal
...
at xCrudGenerator.Form1.WriteAll(StringBuilder strb, String className, Type typeClass, Boolean isMobile) in ...\xCrudGenerator\Form1.cs:line 265
...
InnerException:
Re: New Database Table Pattern
As you found out, Decimal database types have not been implemented. There hasn't been a need, doubles have been sufficient. Is there are particular reason you are wanting to use decimal instead of double in the database?
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com
-
- Posts: 12
- Joined: Tue Apr 09, 2013 12:24 pm
Re: New Database Table Pattern
I think the section towards the end of the Pattern about strings and ints made me think about any issues with other types...