TRY: sub AllRecord(middleid)
 set cmd=server.CreateObject("adodb.command")
 cmd.ActiveConnection=conn
 cmd.commandtext="sp_new_AllRecord '传入参数'"
set ttt=cmd.execute
if not ttt.eof  then
  response.write ttt("allid")
  end if
  ttt.close
  set cmd=nothing
  end sub
  conn.close
  set conn=nothing

解决方案 »

  1.   

    缺少输入参数:
    cmd.commandtext="sp_new_AllRecord '001' "
      

  2.   

    @middleid,你的存储过程定义了一个参数,你没有传参数当然不行,你把参数传上去就行了
    至于参数怎么传,你自己查一下asp的帮助,看看comman怎么传
    好像是command.parameters.add("@middleid",参数值,参数类型)
    我记得不是很请楚了
      

  3.   

    过程 'sp_new_AllRecord' 需要参数 '@middleid'已经提示清楚了,所以cmd.commandtext="sp_new_AllRecord '参数' "这个存储过程并没有输出值,只是执行了一个select 操作!
      

  4.   

    修改后它输出为0
     set cmd=server.CreateObject("adodb.command")
     cmd.ActiveConnection=conn
     cmd.commandtext="sp_new_AllRecord 'middleid'"
    set ttt=cmd.execute
    if not ttt.eof  then
      response.write ttt("allid")
      end if
      ttt.close
      set cmd=nothing
      end sub
      conn.close
      set conn=nothing
      

  5.   

    你这样改完了当然是零,middleid是你的参数值,不是你的参数,因此你要把middleid该为你的实际值,如果你的实际值是动态的,那你必须通过字符串的形式把他们连接起来,或者通过上面我说的那种利用他的属性来传递参数
      

  6.   

    cmd.commandtext="sp_new_AllRecord"&"'"&middleid&"' "给分
      

  7.   

    最简单的加法
    cmd.parameters.add("@变量名字",该变量的值)如果是字符加引号