Hi,

I'm trying to fetch some data typed "time without time zone" from a
Postgresql database but I can't get it to work. According to the SOCI
documentation, this should bind to a std::tm struct and this is what causes
the problem. This is an example of code that throws an exception :

soci::session session(soci::postgresql, "...");
soci::rowset<soci::row> variables =
      session.prepare << "select name, value from time_variables";
soci::rowset<soci::row>::const_iterator it = variables.begin();

At runtime, there is an exception at the last line :

terminate called after throwing an instance of 'soci::soci_error'
  what():  Cannot convert data to std::tm.

In the example, the column "value" is typed "time".
I'm using SOCI 3.0.0 with Postgresql 8.3.7, compiling on Linux with gcc
4.3.3

I didn't find any reference to this problem in the archives so it may be
doing something wrong but I can't see what.

Regards.

-- 
François Hervieux
[email protected]
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to