asp后台程序死循环问题!

王朝知道·作者佚名  2009-08-01
窄屏简体版  字體: |||超大  
 
分類: 電腦/網絡 >> 程序設計 >> 其他編程語言
 
問題描述:

前台界面!!可以申请的!!数据库有内容!!我下载数据库下来看!就有!!后台!不知道哪里错!!打开很慢.好象是死循环!原因是我把两数据库合并为一个了!

.点击打开的时候.往下拉很长!没有内容..又很慢!!代码如下!

<% ' Get table name

tablename = "[msg]"

dbwhere = ""

a_search = ""

b_search = ""

%><%

' Get search criteria for basic search

pSearch = Request.QueryString("psearch")

If pSearch <> "" Then

pSearch = replace(pSearch,"'","''")

pSearch = replace(pSearch,"[","[[]")

b_search = b_search & "[gdl_name] LIKE '%" & pSearch & "%' OR "

b_search = b_search & "[u_name] LIKE '%" & pSearch & "%' OR "

b_search = b_search & "[u_address] LIKE '%" & pSearch & "%' OR "

b_search = b_search & "[u_contact] LIKE '%" & pSearch & "%' OR "

b_search = b_search & "[u_company] LIKE '%" & pSearch & "%' OR "

End If

If len(b_search) > 4 Then

b_search = mid(b_search,1,len(b_search)-4)

b_search = "(" & b_search & ")"

End If

%><%

'Build search criteria

If a_search <> "" Then

dbwhere = dbwhere & a_search 'advance search

ElseIf b_search <> "" Then

dbwhere = dbwhere & b_search 'basic search

End If

'Save search criteria

If dbwhere <> "" Then

Session("tablename") = tablename

Session("dbwhere") = dbwhere

'reset start record counter

startRec = 1

Session("<--##tablevar##-->_REC") = startRec

Else

If tablename = Session("tablename") Then

dbwhere = Session("dbwhere")

Else

'reset search criteria

dbwhere = ""

Session("dbwhere") = dbwhere

End If

End If

'Get clear search cmd

If Request.QueryString("cmd").Count > 0 then

cmd=Request.QueryString("cmd")

If ucase(cmd) = "RESET" Then

'reset search criteria

dbwhere = ""

Session("dbwhere") = dbwhere

End If

End If %>

太长省掉一点.下载地址http://www.bbkc.com.cn/10.rar如果改好了!追加280分!!!一定加!!我急用!谢谢各位了!

參考答案:

这样也看不出什么

最好你还是一步步调试,觉得问题应该在do while语句中

屏蔽do while看有没有错误,确定错误位置就好办了

小贴士:① 若网友所发内容与教科书相悖,请以教科书为准;② 若网友所发内容与科学常识、官方权威机构相悖,请以后者为准;③ 若网友所发内容不正确或者违背公序良俗,右下举报/纠错。
 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航