|
|
|
7i24.Com不停为您服务
例子如下:(其中“zhxxdb”是一个foxpro数据源,指向被访问库所在的路径)
<% dim i,star,lend,tsql
sql=request.querystring("q")
if sql="" then
sql=Session("query")
end if
Session("query")=sql
for i=1 to len(sql)-4
if mid(sql,i,4)="like" then
star=i+5
lend=i+6
while mid(sql,lend,1)<>"'"
lend=lend+1
wend
sql=left(sql,star-1)+"%"+mid(sql,star,lend-star)+"%"+mid
(sql,lend,len(sql)-lend+1)
end if
next
set objdbconnection=server.createobject("ADODB.Connection")
objdbconnection.open "zbxxdb"
set zbxx=objdbconnection.execute(sql)
if zbxx.bof and zbxx.eof then
response.write "<strong>很抱歉,没有找到您所需要的数据!!
</strong> <p>"
response.write"<a href='menuset.asp'> 单击这里返回上一页!
</a> "
response.write "<img src='http://101.101.101.219/sbzb/image/ds-
boy.gif' tppabs='ds-boy.gif' width='48' height='48' alt='抱歉,
抱 歉!!!'><p> "
else
zbxx.movefirst
|
|
|