function run_proc(byref cmd, proc_name, exec_type) on error resume next dim bool, member, param bool = true cmd.activeConnection = ado cmd.commandText = proc_name cmd.commandType = adCmdStoredProc cmd.parameters.refresh for each member in cmd.parameters param = replace(member.name, "@", "") if not isempty( request(param) ) then cmd.parameters(member.name) = request(param) end if next cmd.execute , , exec_type if err.number <> 0 then run_proc = err.description else run_proc = true end if end function if not isempty(request.form("btnEditAccount")) then set adoProc = server.createObject("ADODB.Command") proc = run_proc(adoProc, "sp_updateAdminUserDetails", adExecuteNoRecord) if proc = true then status_msg = "
Successfully Updated Administrator Account
" else status_msg = "ERROR: Could not update administrator account.
"& proc &"