asp 基本问题

myhwlj 2004-01-30 12:43:19

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e31'

[Microsoft][ODBC SQL Server Driver]超时已过期

/index.asp,行440
===============
<%
dim sql
dim rs
set conn=server.createobject("adodb.connection")
conn.open"filedsn=c:\program files\common files\odbc\data sources\autoinfo.dsn"
if session("kind")="" and session("keyword")="" then
sql="select * from gqxx order by fbrq desc"
elseif session("kind")<>"" and session("keyword")="" then
if session("kind")="供应" then
sql="select xxlb,xxtm,fbrq,szsf from gqxx where xxlb='"&session("kind")&"' order by fbrq desc"
else
sql="select xxlb,xxtm,fbrq,szsf from gqxx where xxlb='"&session("kind")&"' order by fbrq desc"
end if
elseif session("kind")<>"" and session("keyword")<>"" then
if session("kind")="供应" then
sql="select xxlb,xxtm,fbrq,szsf from gqxx where xxlb='"&session("kind")&"' and xxtm like '%"&session("keyword")&"%' order by fbrq desc"
else
sql="select xxlb,xxtm,fbrq,szsf from gqxx where xxlb='"&session("kind")&"' and xxtm like '%"&session("keyword")&"%' order by fbrq desc"
end if
elseif session("kind")="" and session("keyword")<>"" then
sql="select xxlb,xxtm,fbrq,szsf from gqxx where xxtm like '%"&session("keyword")&"%' order by fbrq desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1 *********** 就这里出错 if rs.eof and rs.bof then
response.write "<p align='center'> 本页正在建设,暂时没有任何信息!</p>"
else
totalput=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*Pagesize>totalput then
if (totalPut mod Pagesize)=0 then
currentpage= totalPut \ Pagesize
else
currentpage= totalPut \ Pagesize + 1
end if
end if
if currentPage=1 then

showContent

else
if (currentPage-1)*Pagesize<totalput then
rs.move(currentPage-1)*Pagesize
dim bookmark
bookmark=rs.bookmark

showContent

else
currentPage=1

showContent

end if
end if
rs.close
end if

set rs=nothing
conn.close
set conn=nothing

'showcontent函数
sub showContent
dim k
k=0
%>
...全文
96 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluesmile979 2004-01-30
  • 打赏
  • 举报
回复
你哪个if之后没写end if 吧,仔细找找

28,407

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧