showproc.asp

来自「j2me lan 聊天 server 基于 servlet 使用向导: 」· ASP 代码 · 共 60 行

ASP
60
字号
<%if Session("admin")=true then%>
<!--#include file="config.asp"-->
<%
if Request("action")="delete" then
	sql=Request("sql")

	Set Con=Server.CreateObject("ADODB.Connection")
	Con.Open constr

	Con.Execute(sql)
%>
<html>
<head>
<meta HTTP-EQUIV="Refresh" content="2; URL=main.asp">
<title>操作成功</title>
<link rel="stylesheet" href="master.css" type="text/css">
</head>

<body bgcolor="#efefff">

<p>&nbsp;</p>
<blockquote>
  <p class="detaillabels">操作成功执行</p>
  <p class="detaillabels">等待2秒回到主工作区或按<a href="main.asp">这里</a>.</p>
<center>
  <table width="265" border="0" cellpadding="0" cellspacing="0">

  </table>
</center>
</blockquote>
</body>
</html>
<%else%>
<title>存储过程</title>
<link rel="stylesheet" href="master.css" type="text/css">
<body bgcolor="#efefff" class="detaillabels">
<table width="49%" border="1" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="26%" class="detaillabels">存储过程:</td>
    <td width="74%" class="detaillabels"> 
      <%
		Set Con=Server.CreateObject("ADODB.Connection")
		Con.Open constr

		sTableName = Request("table")
      	Set adox = Server.CreateObject("ADOX.Catalog")
		adox.ActiveConnection = Con
		Response.Write "<textarea cols=40 rows=5 class=""tbflat"">" & adox.Procedures(sTableName).Command.CommandText & "</textarea><br>"
%>
    </td>
  </tr>
</table>
<p><a href="showproc.asp?action=delete&sql=DROP+PROCEDURE+[<%=sTableName%>]">删除该存储过程?</a></p>
<%
  Set adox=Nothing
  Con.Close
  Set Con=Nothing
End if
end if
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?