<!--#include file="conn.asp"-->
<% 

dim cardid,jihao,returnstr
if request("CardId")="" or request("jihao")="" then
	Response.Write "Ricom Systemswww.ricom.com.hkcount=0&"&"gzbh=&"&"xm="&"TransErr"&"&bmbh=&"&"ksbh=1"&"&"&"ly="
	Conn.close
	Response.end
end if	
jihao=trim(request("jihao"))
cardid=trim(request("CardId"))

'取时间 有Time的是V9
if request("Time")="" then
	dhour=trim(request("hour"))
	dmin=trim(request("min"))
else
	dhour=left(trim(request("Time")),2)
	dmin=right(left(trim(request("Time")),4),2)
end if

set objCmd=Server.CreateObject("Adodb.Command")
objCmd.ActiveConnection=conn
objCmd.CommandText="Pr_Kcardsea"    '指定存储过程名称
objCmd.CommandType=4  '其为Stored Procedure

'-----传参数到存储过程-------cardid/jihao/return(存储过程返回参数)  
  objCmd.Parameters.Append objCmd.CreateParameter("@cardid",200,1,10,cardid)
  objCmd.Parameters.Append objCmd.CreateParameter("@jihao",3,1,,jihao)
  objCmd.Parameters.Append objCmd.CreateParameter("@dhour",200,1,2,dhour)
  objCmd.Parameters.Append objCmd.CreateParameter("@dmin",200,1,2,dmin)
  objCmd.Parameters.Append objCmd.CreateParameter("@return",200,2,200,returnstr)
'-----执行存储过程----------------------
objCmd.Execute

'输出返回参数
response.Write  objCmd.Parameters("@return").Value 
'清除
Set objCmd.ActiveConnection = nothing
Set objCmd = nothing
Conn.close
%>

