设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 75|回复: 1
打印 上一主题 下一主题

[讨论] 运行出错了,请大家看一下.

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-14 05:40:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大家好,这是一个含asp代码的页面代码.在运行时出现如下错误

Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft VBScript 编译器错误 错误 '800a0401'
语句未结束
/claw/99tm/cc454/Selectrecord.asp,行374
sql="where age>=" & age1 &" and "age<="& age2
---------------------------------^一下是代码:

!--#include file="conn.asp"-->
<html>
<head>
<title>selectrecord.asp</title>
</head>
<body>
<div align="center"><font color=DarkCyan size=7><strong>List a Database</strong></font></div>
<TABLE cellSpacing=1 cellPadding=1 bgcolor="#b0c4de" border="1" width="70%">

<%
dim sql,customerID1,customerID2,fname,gender,age1,age2,col,rdoset
customerID1=request.form("customID1")
customerID2=request.form("customID2")
fname=request.form("fname")
gender=request.form("gender")
age1=request.form("age1")
age2=request.form("age2")
rdoset=request.form("rdoset")

select case rdoset
case "1"
sql= "where customerID>="& customerID1 & "and costomerID<=" & customerID2
case "2"
sql="where firstname like" & fname&"%"
case "3"
sql="where gender=" & gender
case "4"
sql="where age>=" & age1 &" and "age<="& age2
end select
if request.form("col").count=0 then
sql="select*from details" & sql
else
col=request.form("col")
sql="select"& col % "from details "% sql
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,1,3
%>
<tr>
<%
for each Field in rs.Fields
Response.Write "<TH>" & Field.name & "</TH>"
next
%>
</tr>
<tr>
<%
do while not rs.EOF
Response.Write "<TR>"
for each Field1 in rs.Fields
Response.Write "<TD>" & Field1.value & "</TD>"
next

Response.Write "</TR>"
rs.MoveNext
loop
rs.Close
set rs= nothing
%>
</tr>
</table><p>
<P align=center ><A href='Homepage.html'>Go Back Homepage </A></P>
</body>
</html>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-19 00:50 , Processed in 0.112155 second(s), 8 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表