如何从存储过程中获取值

更新时间:2022-05-25 23:03:05

这段代码应该向你展示如何在 VB6/ADO 经典中做到这一点:

This code should show you how to do it in VB6/ADO classic:

Set cmdTemp = New ADODB.Command
Set cmdTemp.ActiveConnection = gcnxMain
cmdTemp.Parameters.Append cmdTemp.CreateParameter("Ret", adInteger, adParamReturnValue)
cmdTemp.CommandType = adCmdStoredProc
cmdTemp.CommandText = "Procname"
cmdTemp.Execute
MsgBox "Return Value: " & cmdTemp.Parameters("Ret")