源代码如下:
一、文件query.asp:
<%@ Language=VBScript %>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<form method="post" action="./queryResult.asp" target="_blank">
<%
dim Cn
dim Rs
dim sql
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.Open "qyxAccess1","",""
Set Rs= Server.CreateObject("ADODB.Recordset")
sql="select qici,question from huiyi"
'sql="select qici,question from huiyi"
Set rs = Cn.Execute(Sql)
请选择查询条件:
<select size="1" name="searchselect">
<option selected value="请选择主题内容">请选择主题内容</option>
&nbsp;
<%
'列出所有会议主题
while not RS.EOF %>
<option value="<%=RS("qici")%>"><%=RS("question")%></option>
<%RS.MoveNext
wend%>
</select>
<p> </p>
<p>&nbsp;
<%
rs.close
cn.close
set rs=nothing
set cn=nothing
%>
二、文件queryResult.asp
<%@ LANGUAGE="VBSCRIPT" %>
<% option explicit%>
<!-- #include file="inc/char.inc" -->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<p align="center"><b><font color="#FF0000" face="宋体" size="6">冀东油田采油工艺研究所</font></b></p>
<p align="center"><b><font color="#FF0000" size="7" face="宋体">会议纪要</font></b></p>
<p align="center"><font face="宋体" color="#000000" size="3">第十六期</font></p>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><font face="宋体" color="#000000" size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
采油工艺研究所办公室 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2001所9月25日</font></td>
</tr>
<tr>
<td width="100%">
<hr color="#FF0000" noshade width="90%">
</td>
</tr>
</table>
</body>
</html>
<%
dim Cn
dim Rs
dim sql
dim body
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.Open "qyxAccess1","",""
Set Rs= Server.CreateObject("ADODB.Recordset")
sql="select * from huiyi where qici='"&trim(Request.Form("searchselect"))&"'"
'sql="select neirong from huiyi where qici='"&trim(Request.Form("searchselect"))&"'"
Set rs = Cn.Execute(Sql)
body=rs("neirong")
if not rs.eof then
showbody(body)
'response.write rs("neirong")
end if
rs.close
cn.close
set rs=nothing
set cn=nothing
%>