?求解精度问题:VC的float与SQL的decimal?
存储过程中有一个decimal(18,0)的字段,现在要将一个vc的float的变量放进去,但是直接插入会出现精度无效的错误
_variant_t v_Score = _variant_t( Score );
pScore.CreateInstance(__uuidof(Parameter));
pScore = m_pCommand -> CreateParameter
(
_bstr_t( "Score" ),
adNumeric,
adParamInput,
v_Score
);
m_pCommand -> Parameters -> Append(pScore);
Execute的时候就弹出精度无效的错误了。。。