asp 在win2000与XP中不同运行结果
原代码:
<!--#include file="conn.asp"-->
<% response.Buffer=false
dim strSQL,Rs
set Rs=server.CreateObject("ADODB.Recordset")
strSQL="select * from student"
Rs.Locktype=3
Set Rs=conn.Execute(strSQL)
%>
<form action=" <%=request.ServerVariables("SCRIPT_NAME") %>">
筛选 <select name="fld">
<%
for each fd in Rs.fields
response.write(" <option value='"&fd.name&"'>"&fd.name&" </option>")
next
%>
</select>
<select name="opt">
<option value=">"> > </option>
<option value=" <"> < </option>
<option value="="> = </option>
<option value="Like">Like </option>
</select>
<input type="text" name="value" size="3">
<input type="submit" name="filter" value="筛选" />
<input type="submit" name="back" value="取消" />
</form>
<%
if request.QueryString("filter") <>"" then
'生成筛选条件
str=request.QueryString("fld")&request.QueryString("opt")&request.QueryString("value")
Rs.filter=str
'显示筛选后的结果
call writeAllRecord()
elseif request.QueryString("back") <>"" then
'取消筛选
Rs.Filter=AdFilterNone
call WriteAllRecord()
else
call WriteAllRecord()
end if
function WriteAllRecord()
'该函数用于显示当前记录集中的全部记录
if Rs.Bof and Rs.eof then
response.write "记录集为空,没有可用的查询结果"
else
response.Write(" <table border='1'>")
do while not Rs.EOF
response.Write(" <tr>")
for each fd in Rs.fields
response.Write(" <td>"&fd.value&" </td>")
next
response.Write(" </tr>")
Rs.MoveNext
Loop
response.Write(" </table>")
end if
end function
%>
运行结果:可以到如下地址去,125.90.89.195/33.asp
当选择 < = 运行时可以得到正确的结果
当选择 > like 运行时提示错误,(名字如标题)
说是错误行:Rs.filter=str
补充一个问题:
上述文件用XP系统做服务器的运行情况这是样
当选择 > < =都可以得到正确的结果
只有选择 LIKE时出现错误,错误内容相同
用2000系统做服务器时,
当选择 < = 时得到正确结果
当选择 > like 运行时提示错误,
麻烦各位高手帮忙,感激不尽。
<!--#include file="conn.asp"-->
<% response.Buffer=false
dim strSQL,Rs
set Rs=server.CreateObject("ADODB.Recordset")
strSQL="select * from student"
Rs.Locktype=3
Set Rs=conn.Execute(strSQL)
%>
<form action=" <%=request.ServerVariables("SCRIPT_NAME") %>">
筛选 <select name="fld">
<%
for each fd in Rs.fields
response.write(" <option value='"&fd.name&"'>"&fd.name&" </option>")
next
%>
</select>
<select name="opt">
<option value=">"> > </option>
<option value=" <"> < </option>
<option value="="> = </option>
<option value="Like">Like </option>
</select>
<input type="text" name="value" size="3">
<input type="submit" name="filter" value="筛选" />
<input type="submit" name="back" value="取消" />
</form>
<%
if request.QueryString("filter") <>"" then
'生成筛选条件
str=request.QueryString("fld")&request.QueryString("opt")&request.QueryString("value")
Rs.filter=str
'显示筛选后的结果
call writeAllRecord()
elseif request.QueryString("back") <>"" then
'取消筛选
Rs.Filter=AdFilterNone
call WriteAllRecord()
else
call WriteAllRecord()
end if
function WriteAllRecord()
'该函数用于显示当前记录集中的全部记录
if Rs.Bof and Rs.eof then
response.write "记录集为空,没有可用的查询结果"
else
response.Write(" <table border='1'>")
do while not Rs.EOF
response.Write(" <tr>")
for each fd in Rs.fields
response.Write(" <td>"&fd.value&" </td>")
next
response.Write(" </tr>")
Rs.MoveNext
Loop
response.Write(" </table>")
end if
end function
%>
运行结果:可以到如下地址去,125.90.89.195/33.asp
当选择 < = 运行时可以得到正确的结果
当选择 > like 运行时提示错误,(名字如标题)
说是错误行:Rs.filter=str
补充一个问题:
上述文件用XP系统做服务器的运行情况这是样
当选择 > < =都可以得到正确的结果
只有选择 LIKE时出现错误,错误内容相同
用2000系统做服务器时,
当选择 < = 时得到正确结果
当选择 > like 运行时提示错误,
麻烦各位高手帮忙,感激不尽。
...全文
相关推荐
带有ASP的简易留言簿
- WinXP/Windows/Win2K:这些是操作系统平台,表明该留言簿可能在不同的Windows系统环境下运行,如Windows XP、Windows(可能是对Windows系统的泛指)和Windows
电子商务作业旅游网站设计方案.pdf
操作系统需支持Windows 98/2000/XP/Vista/Win7,运行环境为IIS4.0,数据库选用SQL Server 2005,以确保数据的安全性和完整性。 2.
DELPHI 快速开发OCX步骤
不过,测试证书仅适用于Win2000系统,对于XP系统,特别是打过补丁的版本,可能无法使用。此外,还可以参考《使用Delphi快速开发ActiveX控件》的文章来获取更多指导。
IIS服务安装包支持WIN98 XP 2000 WIN7
在描述中提到的"WIN98 XP 2000 WIN7",意味着这个安装包兼容的Windows版本包括Windows 98、Windows XP、Windows 2000和Windows 7。
迷你asp服务器2000/xp/vista
迷你ASP服务器2000/xp/vista是一款轻量级的Web服务器软件,专为运行在Windows 2000、Windows XP以及Windows Vista操作系统上的ASP(Active Server


