connection fail error
I try to connect mysql with MySQL Connector/C++(mysql-connector-c++-noinstall-1.0.5-win32-vs2005.zip).
I wrote simple code for connection test.
try
{
sql::Driver* pDriver = sql::mysql::MySQL_Driver::Instance();
sql::Connection* pConn = pDriver->connect( "localhost", "root", "" );
std::auto_ptr<sql::Statement> pStmt( pConn->createStatement() );
}
catch ( sql::SQLException& e )
{
std::string strErr = e.what();
TRACE( "DB_Ex ( %d ) : %s ", e.getErrorCode(), strErr.c_str() );
}
and then run with code, but I get the follow error.
DB_Ex ( 2005 ) : Unknown MySQL server host '儆儆localhost' (11004)
when I try to release mode, It's Ok. but debug mode is fail.
Why?
What I have to do for solve the problem?
Subject
Views
Written By
Posted
connection fail error
5326
August 27, 2009 06:28AM
3539
August 31, 2009 04:56AM
3030
August 31, 2009 07:51PM
2985
September 01, 2009 03:12AM
3222
September 28, 2009 05:34PM
3994
October 15, 2009 07:17AM
2922
October 21, 2009 03:51AM
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.