請首先設置好GConnection和GCommandGCommand.ActiveConnection = GConnection
With GCommand
.CommandType = adCmdStoredProc
.CommandText = "存儲過程名"
.Parameters(1).Direction = adParamOutput'2個輸出參數
.Parameters(2).Direction = adParamOutput
.Parameters(3).Value = Action '3個輸入參數
.Parameters(4).Value = Layer
.Parameters(5).Value = Attrition
.execute
End WithErrnum = GCommand.Parameters(1).Value '得到返回參數
Errmsg = GCommand.Parameters(2).Value
With GCommand
.CommandType = adCmdStoredProc
.CommandText = "存儲過程名"
.Parameters(1).Direction = adParamOutput'2個輸出參數
.Parameters(2).Direction = adParamOutput
.Parameters(3).Value = Action '3個輸入參數
.Parameters(4).Value = Layer
.Parameters(5).Value = Attrition
.execute
End WithErrnum = GCommand.Parameters(1).Value '得到返回參數
Errmsg = GCommand.Parameters(2).Value
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货