ASP在线求助

来源:百度知道 编辑:UC知道 时间:2024/06/01 02:35:26
<%if session("LHB_MiMa")<>"" then%>
<!--#include file="LHB_head.asp"-->
<!--#include file="LHB_DHT_01.asp"-->
<table width="768" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td class="table4"><!--#include file="LHB_DHT_02.asp"--></td>
</tr>
</table>

<!--#include file="config.asp"-->
<table width="768" border="0" cellpadding="0" cellspacing="0" height="25" align="center">
<tr>
<td width="13%" align="center" height="25" class=table44>序号</td>
<td width="19%" align="center" height="25" class=table44>科室名称</td>
<td width="21%" alig

sql="select * from LHB_Office_IP where L_ip_IP = '" & request("LHB_ip_IP") & "'"
============================================
没有数据是因为sql="select * from LHB_Office_IP where L_ip_IP = '" & request(LHB_ip_IP) & "'" 这句语句查不出数据

条件是 L_ip_IP = '" & request(LHB_ip_IP) & "'"

request(LHB_ip_IP) 这个值是空,因为在你的程序里没有LHB_ip_IP这个变量名,怀疑你学错了,是不是应该request("LHB_ip_IP")?

确定你前面搜索时有提交“LHB_ip_IP”这个参数!

条件

学会断点调试
先检查LHB_ip_IP这个参数是否被传递过来了
然后检查sql语句是否有语法问题!
试试
sql="select * from LHB_Office_IP where L_ip_IP = "& request("LHB_ip_IP")

sql="select * from LHB_Office_IP where L_ip_IP = '" & request(LHB_ip_IP) & "'"

改为:
sql="select * from LHB_Office_IP where L_ip_IP = '" & trim(request(LHB_ip_IP)) & "'"