Infact if string Result_BD_QUERY is local to myfunction all it's all but at the end
all the object local are deleted and a error occur
So I supose that connector has been generate with viusal sutdio option /Mt my project is generated with /MD
So the stack is different ==> Do crash
lok to the site page :
https://stackoverflow.com/questions/4822958/mysql-c-connector-getstring-doesnt-work-correctly-while-getint-works-perfe
My code here bellow
.....
result->next(); // point to thr first Record
string Result_BD_QUERY = result->getString(1);
Mess_DATE = Result_BD_QUERY.c_str();
if (Result_BD_QUERY.c_str() != (char *)CHAINE_VIDE)
{
Error = (int)Calcul_Date::BD_OK;
Extract_Date((CString)Result_BD_QUERY.c_str());
}
else
{
// Error MDP or password invalid
Error = (int)Calcul_Date::BD_INVALID_USER_OR_PASSWORD;
}
delete result;
delete stmt;
delete con;
}
catch (sql::SQLException e)
{
return(Error);
}
return(Error);
}
return((int)Calcul_Date::BD_INIT_FAILED);
all the object local are deleted and a error occur
So I supose that connector has been generate with viusal sutdio option /Mt my project is generated with /MD
So the stack is different ==> Do crash
lok to the site page :
https://stackoverflow.com/questions/4822958/mysql-c-connector-getstring-doesnt-work-correctly-while-getint-works-perfe
My code here bellow
.....
result->next(); // point to thr first Record
string Result_BD_QUERY = result->getString(1);
Mess_DATE = Result_BD_QUERY.c_str();
if (Result_BD_QUERY.c_str() != (char *)CHAINE_VIDE)
{
Error = (int)Calcul_Date::BD_OK;
Extract_Date((CString)Result_BD_QUERY.c_str());
}
else
{
// Error MDP or password invalid
Error = (int)Calcul_Date::BD_INVALID_USER_OR_PASSWORD;
}
delete result;
delete stmt;
delete con;
}
catch (sql::SQLException e)
{
return(Error);
}
return(Error);
}
return((int)Calcul_Date::BD_INIT_FAILED);