MySQL Forums
Forum List  »  Connector/C++

Connector 1.1.19 cpp getstring error Libary generation
Posted by: Jean BEZET
Date: February 02, 2020 10:48AM

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);

Options: ReplyQuote


Subject
Views
Written By
Posted
Connector 1.1.19 cpp getstring error Libary generation
638
February 02, 2020 10:48AM


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.