【求看】sql语句运行后正常,但在asp表单上show不出来是怎么回事?
在表单上show出语句在sql中运行正常表单上却显示不出记录,是怎么回事呢?
<!--#include file="conn.asp"-->
<!--#include file="global_asp_fun.asp"-->
<script language="javascript">
function formCheckValue()
{
for(i=0;i<document.forms[0].elements.length;i++)
{
var e=document.forms[0].elements[i];
if((e.value==""||e.value==" ")&&e.name!="checkbox"&&e.name!="diskno")
{
alert("指定的域值 "+e.name+" 不能为空!!!");
e.focus();
return false;
}
else
{if(!onlyCharacters(e.value)&&e.name!="mdtm"&&e.name!="Submit")
{alert("非法字符:"+e.value);
e.focus();
return false;}
if(!onlyCharacters2(e.value)&&e.name=="lmax")
{alert("非法字符:"+e.value);
e.focus();
return false;}}
}
} </script>
<style type="text/css">
<!--
.style1 {font-size: 24px}
-->
</style>
<form name="form1" method="post" action="">
<table width="439" height="109" border="1" align="center">
<tr bgcolor="#66CC99">
<td height="35" colspan="2"><div align="center" class="style1">光盘资料维护</div></td>
</tr>
<tr>
<td width="236" height="31"><div align="center">光盘类别:</div></td>
<td width="187">
<select name="disktype">
<option value="系统盘" <%if request.form("disktype")="系统盘" then response.Write("selected=1") end if%>>系统盘</option>
<option value="工具盘" <%if request.form("disktype")="工具盘" then response.Write("selected=1") end if%>>工具盘</option>
<option value="软件盘" <%if request.form("disktype")="软件盘" then response.Write("selected=1") end if%>>软件盘</option>
</select></td>
</tr>
<input name="test" type=hidden value="<%if q=request.Form("test")<>"" then response.Write q+1 else response.write 0 end if%>">
<tr>
<td height="33"><div align="center">光盘名称:</div></td>
<td><input name="diskname" type="text" size="10">
<input type="submit" name="Submit3" value="查询"></td>
</tr>
</table></form>
<p>
<%'if request.Form("Submit3")<> "" then%>
<%if request.Form("disktype")<> "" then%>
<form name="frm2" action="24.asp" method="post">
<%
dim iRows
dim ArrFlag,ArrSql,ArrVal
'if request.Form("diskname")<>""
ArrSql ="select disktype,diskno,diskname,lisence,mark,stat,mdtm from YSCMDISK where diskname like '%"&request.Form("diskname")&"%' and disktype='"&request.Form("disktype")&"'"
'else
'ArrSql ="select disktype,diskno,diskname,lisence,mark,stat,mdtm from YSCMDISK where diskname disktype='"&request.Form("disktype")&"'"
'end if
response.Write arrsql
response.Write (" 查询结果如下:")
ArrFlag =QueryFun(ArrSql,ArrVal)
'response.write ArrSql
'response.write ArrVal(1,4)'
'response.write ArrVal(0,5)
'response.end
set conn=nothing
%>
</p>
<table width="746" height="99" border="1" align="center">
<%if arrglag then%>
<tr bgcolor="#66CC99">
<td width="56">删除</td>
<td width="97" height="27">储位</td>
<td width="95">光盘名称</td>
<td width="90">类别</td>
<td width="86">状态</td>
<td width="159">备注</td>
<td width="117">序列号</td>
</tr>
<%dim i
for i=0 to UBOUND(ArrVal)%>
<tr>
<td><input type="checkbox" name="checkbox" value="<%=ArrVal(i,1)%>"> </td>
<td height="59"> <input name="diskno1" type="text" value="<%=ArrVal(i,1)%>"size="7" maxlength="2"> </td>
<td><input name="diskname1" type="text" value="<%=ArrVal(i,2)%>"size="7"> </td>
<td><input name="disktype1" type="text" value="<%=ArrVal(i,0)%>"size="7" maxlength="1"> </td>
<td><input name="stat1" type="text" value="<%=ArrVal(i,4)%>"size="7" maxlength="1"> </td>
<td><textarea name="mark1" value="<%=ArrVal(i,5)%>" cols="15"></textarea> </td>
<td><input name="lisence1" type="text" value="<%=ArrVal(i,3)%>" size="12"></td>
</tr>
<%next%>
<%end if %>
</table>
<table width="200" border="0" align="center">
<tr>
<td>
<input type="submit" name="Submit" value="删除" onclick="javascript:return formCheckValue()"></td>
<td>
<input type="submit" name="Submit" value="确认"> </td>
</tr>
</table>
<%end if%>
</form>
<p> </p>