⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 09_05a.asp

📁 ASPTest 网络基础网页设计
💻 ASP
字号:
<html>
<head>
<title>执行存储过程</title>
</head>
<body>
<% 
Dim cn,cmd,rs,param1
Dim mySql
Set cn = Server.CreateObject("ADODB.Connection")
Set cmd = Server.CreateObject("ADODB.Command")
cn.Open "Driver={SQL Server};Server=yangwu;Database=ASPTest;" & _
          "UID=sa;PWD=admin"
cmd.ActiveConnection = cn
cmd.CommandType = 4
cmd.CommandText = "ShowID"
If Len(request("txtID")) = 0 Then
  Set rs = cmd.Execute
Else
  Set param1 = cmd.CreateParameter("@ID",200,1,10,request("txtID"))
  cmd.Parameters.Append param1
  Set rs = cmd.Execute	
End If
%>
<% 
If rs.Eof Then
  Response.Write "对不起,没有找到您要查找的记录"
Else
%>    
<p align="center">搜索结果列表</p>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#111111" width="336" align=center>
  <tr>
    <td width="97">注册ID</td>
    <td width="97">注册密码</td>
    <td width="138">Email地址</td>
  </tr>
<% 
  Do While Not rs.Eof 
%>  
  <tr>
    <td width="97"><%=rs(0)%> </td>
    <td width="97"><%=rs(1)%> </td>
    <td width="138"><%=rs(2)%> </td>
  </tr>
<%   
    If Not rs.Eof Then rs.MoveNext
  Loop
End If
%>   
</table>
<%
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
Set cmd = Nothing
%>
</body>
</html>

⌨️ 快捷键说明

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