MySQL Forums
Forum List  »  Connector/C++

connection fail error
Posted by: Myeongho AN
Date: August 27, 2009 06:28AM

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?

Options: ReplyQuote


Subject
Views
Written By
Posted
connection fail error
5233
August 27, 2009 06:28AM
3482
August 31, 2009 04:56AM
2989
August 31, 2009 07:51PM
2942
September 01, 2009 03:12AM
3107
September 28, 2009 05:34PM


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.