I'm using a mysql database with soci.

In the database I have a column of type UNSIGNED INT but soci only let
me get its value with the type INT.

The type (SIGNED) INT, both in mysql and in C++, has a minimum value of
-2147483648 and  a maximum value of 2147483647.

The type UNSIGNED INT, both in mysql and in C++, has a minimum value of
0 and a maximum value of 4294967295.

So if a number is greater than 2147483647, the returned value would be
incorrect.

However, soci only let me to get that value as INT, I have tried with
UNSIGNED INT, UNSIGNED LONG; LONG LONG, UNSIGNED LONG LONG, and even
with STRING (to convert to long long using strtoll) without luck. Soci
always throws the error std::bad_cast.

Is there any way to get the column value successfully?


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to