i wrote a program that need to connect to database to insert some data , my executable file not connect to database but when i checked with code connection established! i don't know what is problem , do you know what is problem? i use Qt to connect to database and my database is on mySql and here is how i connect :
soccer_db = QSqlDatabase::addDatabase("QMYSQL" , "sss");
soccer_db.setHostName(addrrFile.c_str());
soccer_db.setDatabaseName("sss");
soccer_db.open();
if (!soccer_db.open()){
emit dsignal("ssss not opened. Ckech whether server is down or change config file");
return false;
}