asp 基本问题
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
%>