Private Sub Command3_Click() Set rs4 = New ADODB.Recordset Set cmd = New ADODB.Command cmd.ActiveConnection = mConn cmd.CommandText = "select_users" cmd.CommandType = adCmdStoredProc '返回值 Set param = cmd.CreateParameter("RetVal", adInteger, adParamReturnValue, 4) cmd.Parameters.Append param '输入参数 Set param = cmd.CreateParameter("regname", adChar, adParamInput, 20, Trim(txtregname.Text)) cmd.Parameters.Append param '输出参数 Set param = cmd.CreateParameter("numrows", adInteger, adParamOutput) cmd.Parameters.Append param Set rs4 = cmd.Execute() If cmd.Parameters("RetVal").Value = 1 Then |