这个存储过程怎么出错呀?帮帮我?
奋斗男人 2005-12-15 04:02:12 <%
openDB()
Set Rs=Server.CreateObject("adodb.recordset")
Set cmd = Server.CreateObject("adodb.command")
cmd.activeconnection=Conn
cmd.CommandType=adCmdStoredProc
cmd.commandtext="sp_student_Showinfo"
cmd.Parameters.Append(cmd.CreateParameter("@age",adInteger,adParamInput,22))
cmd.Parameters.Append(cmd.CreateParameter("@name",advarchar,adParamoutput,10))
Rs=cmd.execute()
do while not Rs.eof
Response.Write(Rs("Name"))
Response.Write("<br>")
Rs.movenext
loop
set cmd.activeconnection=Nothing
set cmd=nothing
closeDB()
%>
存储过程:
create proc sp_student_Showinfo
@name char(10)output,
@age int
as
select @name=Name from student where Age=@age
go