MySQL Forums
Forum List  »  Connector/C++

windows example fails STRING TOO LONG
Posted by: Xunlei Wu
Date: December 16, 2016 09:28AM

Hello,
I installed vs14 2015 linked to vs14 version of 2.0.3 prebuild library. I created a project with the exact source code from
http://dev.mysql.com/doc/dev/connector-cpp/devapi_ref.html

When I run the example, I got
Creating session on localhost, port 33060 ...
STD EXCEPTION: string too long
The exception happens at Impl::from_utf8(*this, utf8) where utf8="root".
// TODO: make utf8 conversions explicit

string(const char *other)
{
if (!other)
return;
std::string utf8(other);
--> Impl::from_utf8(*this, utf8);
}


catch (std::exception &ex)
{
cout << "STD EXCEPTION: " << ex.what() << endl;
return 1;
}

Would you please help?

Options: ReplyQuote


Subject
Views
Written By
Posted
windows example fails STRING TOO LONG
467
December 16, 2016 09:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.