Meaningless Drivel is fun!*
The moose likes JDBC 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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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: 590
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
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
Try this fork of the JDBC driver; it specifically adds some support for BigDecimal.


Ping & DNS - my free Android networking tools app
Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 590
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: 590

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)?
 
Similar Threads
Double multiplication problem
Converting to Float
calculating sum for numeric(currency) columns and displaying it with currency code in a JTable
number format
Program that calculates and prints the monthly paycheck for an employee