[Libpqxx-general] Retrieving data from large integers fields

João Pedro Alves P. do Nascimento jpnascim at gmail.com
Wed Feb 4 19:54:36 UTC 2009


Hello,

I am trying to retrieve a bigint value from the databse using
'pqxx::result::tuple' . My idea is to store the value retrieved in a MSVC++
'long long' (int64) variable but I am facing compilation problems with
Microsoft Visual Studio 2003.

The code excerpt is:

//...
        long long bigIntFieldValue
        pqxx::result::tuple row =
stackOfResultSets.back()[currentRecordSetPos];
        row[fieldNameStr].to(bigIntFieldValue);
//...

The compiler error message:

c:\Libpqxx-win32\win32\msvc2003\libpqxx\pqxx\util.hxx(225): error C2027: use
of undefined type 'pqxx::string_traits<T>'
        with
        [
            T=unsigned __int64
        ]

It appears to me that there are no valid conversions from string to int64.
I've also tried activating the compiler flag PQXX_HAVE_LONG_LONG but then I
get problems at runtime (problems with pqxxd.dll entryoint)

Any suggestions ? Help is much appreciated.

Thank you,

Joao Pedro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/libpqxx-general/attachments/20090204/35049634/attachment.html 


More information about the Libpqxx-general mailing list