ResultSet_getStringByName to receive NULL
Thanks for the Version 2.10.4 of libzdb. Please help me, I want to accomodate ResultSet_getStringByName to a String variable, but it comes error if the value returned is NULL. How can I resolve its? This is the error message : terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL not valid Thanks, Hans
Hi Hans, If I understand you correctly, it is a little C++ related question. As far as I remember ResultSet_getStringByName could return NULL, so you should handle it by yourself... It could be something like: char* str = ResultSet_getStringByName(); std::string cppstring(str == NULL? "": str); Good luck, Volodymyr! ________________________________ From: Hans Richardo <qrx_1088@yahoo.com> To: This is the libzdb general mailing list <libzdb-general@tildeslash.com> Sent: Wednesday, June 20, 2012 1:00 PM Subject: ResultSet_getStringByName to receive NULL Thanks for the Version 2.10.4 of libzdb. Please help me, I want to accomodate ResultSet_getStringByName to a String variable, but it comes error if the value returned is NULL. How can I resolve its? This is the error message : terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct NULL not valid Thanks, Hans -- To unsubscribe: http://www.tildeslash.com/mailman/listinfo/libzdb-general
participants (2)
-
Hans Richardo -
Volodymyr Tarasenko