This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)?" Watch "Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)?" New topic
Author

Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)?

Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 634
So far I found that SQLite doesn't support BigDecimal,
Is there a library to work around this?
I need a decimal point for currency with 2 trailing cents digits
Thanks
Jack
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Try this fork of the JDBC driver; it specifically adds some support for BigDecimal.
Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 634
Ulf Dittmer wrote:Try this fork of the JDBC driver; it specifically adds some support for BigDecimal.


Thanks, let me try it.
Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 634

Hello, just wonder what type of fields should be defined for currency values (string or integer)?
and BTW, should I use setBigDecimal or setString or setInt when interfacing with JDBC?

Edit
I know now, I should use VARCHAR, but when comparing amount using having,
say having sum(od.NetSales) > 50000.00
, od is order details, would there be any problems?
just unsure!
Thanks
Jack
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)?
 
jQuery in Action, 3rd edition