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 Verstraete | 23 Dec |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 26 Dec |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • RE: Troubles wit DECIMAL(12,4) | Joel Fielder | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • RE: Troubles wit DECIMAL(12,4) | Joel Fielder | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 4 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Bart Verstraete | 5 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Jonathan Wakely | 5 Jan |
| • Re: Troubles wit DECIMAL(12,4) | Warren Young | 4 Jan |