【刚写的应用程序】刚写的应用于某软件的全文检索程序

更新时间:2014-07-15    来源:word    手机版     字体:

【www.bbyears.com--word】




<%
keyWord=trim(request("oKey"))
sType=trim(request("oType"))
if keyWord="" or keyWord="关键字…" then
Response.Write "请输入关键字!"
Response.End()
end if
if sType="" then
Response.Write "请选择查询信息类别"
Response.End()
end if
dim ftsTable "要查询信息的储存表名
dim ftsFolder "要查询信息的储存文件夹 
if sType="1" then
ftsTable="tb_bzxx"
ftsFolder=fjroot
elseif sType="2" then
ftsTable="tb_other"
ftsFolder=fjroot_other
elseif sType="3" then
ftsTable="tb_info"
ftsFolder=fjroot_info
else
Response.Write "出错了!"
Response.End
end if
sql=""
if sType="1" then
sql="select bz_xuhao as xuhao,bz_name as bname,bz_code as bcode,bz_htm as htm from " & ftsTable
elseif sType="2" then
sql="select p_xuhao as xuhao,p_name as bname,p_code as bcode,p_htm as htm from " & ftsTable
elseif sType="3" then
sql="select info_id as xuhao,info_htm,info_type as htm from " & ftsTable
else
Response.Write "出错了!"
Response.End
end if
Call OPenConn() " 打开数据库连接
set fso=server.CreateObject("scripting.filesystemobject")
set rs=server.createobject("adodb.recordset")
dim oPattern
oPattern="

||

"
"如果是查询第三种信息(其他信息),则先将所有的信息类别取出来,放到数组中。
dim infoType()
if sType="3" then
rs.Open "select type_id,type_name from tb_info_type order by type_id desc",adocon,3,1
if rs.RecordCount<=0 then
CloseRs rs
Call CloseConn
Response.Write "出错了!"

本文来源:http://www.bbyears.com/bangongshuma/7804.html

热门标签

更多>>

本类排行