给你一个按Name搜索的例子
假设数据库已连接,连接变量为conn,数据集为RS
ASP文件源码如下:
-----------------
<%
dim bodytxt,name 'name用于接收表单提交的数据
name=trim(request.form("name"))
sql="select * from A where NAME='" & name & "'"
rs.open sql , conn,1,1
do while not rs.eof
bodytxt=rs("body)
rs.movenext
loop
rs.close
set fso=Server.CreateObject("scripting.filesystemobject")
set fs=fso.OpenTextFile(server.mappath("body.txt"),2,1)
fs.write bodytxt
fs.close
set fs=nothing
set fso=nothing
response.redirect "body.txt"
%>
其它功能需要继续完善。
用txt的形式?你的意思是txt数据库?还是什么?