Re: [Cppcms-users] Bizarre prepared statement problem
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-05-21 08:24:13
|
>> What the hell is going on here? > strange strange. I don't really know if this could help, but: ts is a > string and you give two times the same string into the > preparedstatement. You could try to copy ts to ts2 (string ts2=ts) and > try that again with << ts << ts2. And then if that helps, that would be > strange though ;) > > Find out what's going on there ! ^^ Yeah I tried cloning the string via a copy constructor: sql << os.str() << string(ts) << string(ts); but it made no difference. I believe string always deep copies. In the end, instead of passing it a string, I used strptime() to convert the string to a std::tm struct and it's working fine. Very weird. |