为什么我在使用 ADODB.Command 执行存储过程时,传入的是浮点值,保存的却是整数!With objcmd
.ActiveConnection = cnOracle
.CommandType = adCmdStoredProc
.CommandText = strSQL
Debug.Print .Parameters(i).NumericScale '此处,如果是浮点型参数时仍然为0,不解!!!请高手指点
For i=0 to .Parameters.count-1
.Parameters(i) = varPara(i)
Next
Call .Execute '保存成功时,浮点型参数保存时成了整数型了,自动将浮点型的小数部分截掉了,晕倒!!!
End With
.ActiveConnection = cnOracle
.CommandType = adCmdStoredProc
.CommandText = strSQL
Debug.Print .Parameters(i).NumericScale '此处,如果是浮点型参数时仍然为0,不解!!!请高手指点
For i=0 to .Parameters.count-1
.Parameters(i) = varPara(i)
Next
Call .Execute '保存成功时,浮点型参数保存时成了整数型了,自动将浮点型的小数部分截掉了,晕倒!!!
End With
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货