Use ExecuteUpdate for SQL INSERT statements

Fixes
```
save score failed: (fetch:stmt:2014): Commands out of sync; you can't run this command now
```
This commit is contained in:
heinrich5991 2021-02-24 20:42:47 +01:00
parent 2fb1c723c9
commit 83da81e8c3

View file

@ -618,7 +618,8 @@ bool CScore::SaveScoreThread(IDbConnection *pSqlServer, const ISqlData *pGameDat
pSqlServer->BindString(4, g_Config.m_SvSqlServerName);
pSqlServer->BindString(5, pData->m_GameUuid);
pSqlServer->Print();
if(pSqlServer->Step(&End, pError, ErrorSize))
int NumInserted;
if(pSqlServer->ExecuteUpdate(&NumInserted, pError, ErrorSize))
{
return true;
}
@ -743,7 +744,8 @@ bool CScore::SaveTeamScoreThread(IDbConnection *pSqlServer, const ISqlData *pGam
pSqlServer->BindBlob(4, GameID.m_aData, sizeof(GameID.m_aData));
pSqlServer->BindString(5, pData->m_GameUuid);
pSqlServer->Print();
if(pSqlServer->Step(&End, pError, ErrorSize))
int NumInserted;
if(pSqlServer->ExecuteUpdate(&NumInserted, pError, ErrorSize))
{
return true;
}