StoredProc 사용방법 리턴값

<!–#include file=conn_db.asp–>
<!–#include file=adovbs.inc–>
<%
— 중간 생략 —
Set cmd = Server.CreateObject(“ADODB.command”)
With cmd
.ActiveConnection = conn
.commandtext = “StoreName”
.commandType = adCmdStoredProc

.Parameters.Append .CreateParameter(“@Param01”, adVarchar, adParamInput, 4000)
.Parameters(“@Param01”) = varParam01

.Parameters.Append .CreateParameter(“@Param02”, adVarchar, adParamInput, 2)
.Parameters(“@Param02”) = varParam02

.Parameters.Append .CreateParameter(“@retValue”, adInteger, adParamOutput, 1)
.Execute ln, , adExecuteNoRecords

retCount = .Parameters(“@retValue”)
End with

‘response.write retCount

Set cmd=nothing

CONN.CLOSE
SET CONN = NOTHING