Remark : ASP에서 Stored Procedure 저장 프로시저 적용 샘플
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<!--#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 |