中国开发网: 论坛: 资源共享: 贴子 201220
freewzx: 有事向这里的高手请教
sub SearchInit()
dim str, l,i,OneChar,qz
str = keyword
l = StrLength(str)
Conn_User.execute("update PE_Article set SearchSum = 0")

for i = 1 to l

OneChar = gotChar(str,i) '依次取字符串的字
i = i+1

Conn_User.execute("update PE_Article set SearchSum = SearchSum +" &qz&" where Title like '%" & OneChar & "%' ")
next
end sub

最后用select * from PE_Article where SearchSum>1 order by SearchSum desc显示出来

说明:一个查询程序,把包含查找字符串中任一记录显示出来.win2003+sql2000+Asp,1000条记录
问题:程序运行正常,但速度很慢,耗CPU和时间,表的记录不变,字段内容也不变,我想把Title读到Application数组中,自己排序,再显示,不知行否.各位朋友,请帮小弟出个注意,把它弄快点.

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录