sql server存储过程中,定义输入参数:@折扣率 decimal(10,2)vb代码:
text1.text="0.85"
With adoCmd
.ActiveConnection = cn
.CommandText = "Insert表"
.CommandType = adCmdStoredProc
Set adoParam = .CreateParameter("@折扣率", adDecimal, adParamInput, , Val(text1.text))
.Parameters.Append adoParam
.Execute
end with错误提示:精度不对如何解决?
text1.text="0.85"
With adoCmd
.ActiveConnection = cn
.CommandText = "Insert表"
.CommandType = adCmdStoredProc
Set adoParam = .CreateParameter("@折扣率", adDecimal, adParamInput, , Val(text1.text))
.Parameters.Append adoParam
.Execute
end with错误提示:精度不对如何解决?
adoParam.Precision = 10
.Execute:)