请问,asp调用存储过程时,我要同时获得传出的记录集和传出的参数,请问该怎么写?


 
objCommand.CommandText  ="ap_get_order_cargo_list"              
objCommand.Parameters.Append  objCommand.CreateParameter  ("record_count",adInteger,adParamOutput,4)  
objCommand.Parameters.Append  objCommand.CreateParameter  ("result",adVarWChar,adParamOutput,40)  
set  objRecordset  =  objCommand.Execute  
 
这样写的话只能获得传出的记录集,  
如果这样写的话,只能获得传出参数  
objCommand.Execute  
intRecordTol  =  objCommand("record_count")  
---------------------------------------------------------------  
 
省略建立连接及参数部分  
Set  rs=CmdSP.Execute  
if  rs.state=1  then  
       if  not  rs.eof  then  
           arrayFileCatepory=rs.GetRows  
                 rs.close  
       else  
           rs.close  
           ErrorInfo1="0"  
       end  if  
end  if  
 
set  rs=nothing              ''先关闭RS才能取输出参数!!!!!!!!  
 
RETURN_value=CmdSP.Parameters("RETURN_value").value  
TotalCount=CmdSP.Parameters("@a_intTotalCount").value
posted on 2005-03-13 00:02  轻松逍遥子  阅读(267)  评论(0)    收藏  举报