[Cppcms-users] Cppdb: Bound double constant becomes string of integer
Brought to you by:
artyom-beilis
|
From: CN <cn...@fa...> - 2014-03-13 06:55:09
|
The following double constant 1000000. passed to PostgreSQL: const double E6=1000000.f; cppdb::result r=db_session << "SELECT amount/? FROM mytable" << E6; reaches PostgreSQL as string "1000000": Parameter:$1 = '1000000' As a result, when amount is small, the selected result always becomes 0 rather than decimal like 0.01. Is there any way I can force the parameter to be sent to back end as float or long double? Regards, CN -- http://www.fastmail.fm - One of many happy users: http://www.fastmail.fm/help/overview_quotes.html |