aspose file tools*
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
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: 580
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: 39547
    
  27
Try this fork of the JDBC driver; it specifically adds some support for BigDecimal.


Ping & DNS - updated with new look and Ping home screen widget
Jacky Luk
Ranch Hand

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

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
Program that calculates and prints the monthly paycheck for an employee
calculating sum for numeric(currency) columns and displaying it with currency code in a JTable
number format