I'm trying to retrive a float value from a SQL Server database into a double variable, I'm using this code:
bool CDataAccess::GetValue(UINT col, double& value)
{
int retCode = SQLGetData(m_hstmt, col, SQL_C_DOUBLE, &value, 0, &m_cbValue);
...
}
That code was working fine until last week when Windows update KB5019959 was installed; if I uninstall this update everything works fine again.
If I use SQL_C_FLOAT as parameter or change column type to double, it works, but that change will carry a hugh refactor...
float tmp; int retCode = SQLGetData(m_hstmt, col, SQL_C_FLOAT, &tmp, 0, &m_cbValue); *value = tmp;? My C++ is rusty...GetValue(UINT col, double& value)will be able to work when database column was float or double.