List:MySQL++« Previous MessageNext Message »
From:Bart Verstraete Date:December 23 2007 8:19am
Subject:Troubles wit DECIMAL(12,4)
View as plain text  
Got the following table:

|-----------------------|
| invoices              |
|-----------------------|
| id (bigint(20))       |
| invoice_date (date)   |
| total (decimal(12,4)) |
|-----------------------|

cpp code
connection & query stuff
...
...
...


mysqlpp::longlong id = (mysqlpp::longlong)row["id"];
mysqlpp::Date invoice_date = (mysqlpp::Date)row["invoice_date"];
double total = (double)row["total"] //Throws an exception: Tried to 
convert "6.3000" to a "d

to what other data type can I convert?

Grts Bart
Thread
Troubles wit DECIMAL(12,4)Bart Verstraete23 Dec
  • Re: Troubles wit DECIMAL(12,4)Warren Young26 Dec
    • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
      • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
        • RE: Troubles wit DECIMAL(12,4)Joel Fielder4 Jan
          • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
            • RE: Troubles wit DECIMAL(12,4)Joel Fielder4 Jan
              • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
        • Re: Troubles wit DECIMAL(12,4)Warren Young4 Jan
          • Re: Troubles wit DECIMAL(12,4)Bart Verstraete4 Jan
            • Re: Troubles wit DECIMAL(12,4)Warren Young4 Jan
              • Re: Troubles wit DECIMAL(12,4)Bart Verstraete5 Jan
                • Re: Troubles wit DECIMAL(12,4)Jonathan Wakely5 Jan
      • Re: Troubles wit DECIMAL(12,4)Warren Young4 Jan