<% on error resume next Server.ScriptTimeOut=1000 const adOpenKeyset = 1 const adLockReadOnly = 1 const adLockPessimistic = 2 const adLockOptimistic = 3 Ip = Request.ServerVariables("REMOTE_ADDR") '客户端IP Sever_Name = Request.ServerVariables("SERVER_NAME") '服务器地址 dim conn dim sq_connstr ' connstr="DBQ="+server.mappath("kjb.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" sq_connstr="driver={SQL Server};server=210.51.191.2;uid=renmeang;pwd=rdadfd*&ghg87;database=RenMing" set conn=server.createobject("ADODB.CONNECTION") if err then err.clear else conn.open sq_connstr if err then err.clear end if end if sub GetErrors(bug) set myErrors=Conn.Errors if MyErrors.Count>0 then response.write "对不起,系统运行错误!

错误类型:"+bug+"


请把此页面保存并发送给本站管理员tt@tt91.com,以协助我们查找错误原因,感谢您的支持

" 'for i=0 to myErrors.Count-1 ' response.write "错误"+cstr(i)+":"+myErrors(i).Description+"

" 'next end if set MyErrors = nothing End Sub '-------------------------------------------------------------------- Sub GetData(ssql) '查询数据 on error resume next Set rs = Server.CreateObject("ADODB.RecordSet") rs.ActiveConnection = conn rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open ssql 'bug="数据查询错误,GetData()" 'GetErrors(bug) End Sub '-------------------------------------------------------------------- Sub DealData(ssql) '处理数据 on error resume next Const adCmdText=1 Const RecordsAffected=1 CommandText=ssql Conn.Execute CommandText,RecordsAffected,adCmdText bug="数据添加、修改或删除错误,DealData("+ssql+")" 'bug="数据添加、修改或删除错误,DealData()" GetErrors(bug) End Sub '-------------------------------------------------------------------- Function GetDataNum(ssql) '查询记录数 on error resume next Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open ssql,conn,1,1 'bug="查询记录数错误,GetDataNum()" 'GetErrors(bug) GetDataNum=rs.RecordCount rs.close set rs = nothing End Function '-------------------------------------------------------------------- %> <% Function snlisttow(shu,bid,sid,tid) '首页 set rs=server.createobject("adodb.recordset") sqllist="select top "&shu&" id,anclassid,Nclassid,bookpic,bookname,huiyuanjia,vipjia from products1 where 1=1" if bid<>"" then sqllist=sqllist&" and anclassid='"&bid&"' " end if if sid <>"" then sqllist=sqllist&" and Nclassid='"&sid&"'" end if if tid <>"" then sqllist=sqllist&" and newsbook='"&tid&"'" end if sqllist=sqllist &" order by clike desc" rs.open sqllist,conn,1,1 if not rs.eof then i=0 do while not rs.eof response.write("
"&left(rs("bookname"),10)&"
") i=i+1 rs.movenext if i mod 6 = 0 then response.write("") end if loop else response.write("暂无信息!") end if rs.close : set rs=nothing End Function Function snlist(shu,bid,sid,tid) '点击排序 set rs=server.createobject("adodb.recordset") sqllist="select top "&shu&" id,anclassid,Nclassid,bookpic,bookname,huiyuanjia,vipjia from products1 where 1=1" if bid<>"" then sqllist=sqllist&" and anclassid='"&bid&"' " end if if sid <>"" then sqllist=sqllist&" and Nclassid='"&sid&"'" end if if tid <>"" then sqllist=sqllist&" and newsbook='"&tid&"'" end if sqllist=sqllist &" order by clike desc" rs.open sqllist,conn,1,1 if not rs.eof then i=0 do while not rs.eof response.write("
"&left(rs("bookname"),20)&"
") i=i+1 rs.movenext if i mod 6 = 0 then response.write("") end if loop else response.write("暂无信息!") end if rs.close : set rs=nothing End Function Function snlist1(bid,sid) 'newlist_tow.asp 页面 set rs=server.createobject("adodb.recordset") sqllist="select id,anclassid,Nclassid,bookpic,bookname,huiyuanjia,vipjia from products1 where 1=1" if bid<>"" then sqllist=sqllist&" and anclassid='"&bid&"' " end if if sid <>"" then sqllist=sqllist&" and Nclassid='"&sid&"'" end if sqllist=sqllist &" order by id desc" rs.open sqllist,conn,1,1 if not rs.eof then i=0 do while not rs.eof response.write("
"&left(rs("bookname"),20)&"
") i=i+1 rs.movenext if i mod 6 = 0 then response.write("") end if loop else response.write("暂无信息!") end if rs.close : set rs=nothing End Function Function xinshu(shu) '新书排序 set rs=server.createobject("adodb.recordset") sqllist="select top "&shu&" id,anclassid,Nclassid,bookpic,bookname,huiyuanjia,vipjia from products1 order by clike desc" rs.open sqllist,conn,1,1 if not rs.eof then i=0 do while not rs.eof response.write("
"&left(rs("bookname"),20)&"
") i=i+1 rs.movenext if i mod 6 = 0 then response.write("") end if loop else response.write("暂无信息!") end if rs.close : set rs=nothing End Function Function new1(shu,shu1) set rs=server.createobject("adodb.recordset") sqllist="select top "&shu&" id,NTitle from s_news where 1=1" if bid<>"" then sqllist=sqllist&" and NType='"&shu1&"' " end if sqllist=sqllist &" order by id desc" rs.open sqllist,conn,1,1 if not rs.eof then do while not rs.eof response.write(""&rs("Ntitle")&"
") rs.movenext loop else response.write("暂无信息!") end if rs.close : set rs=nothing End Function Function new2(shu,shu1) set rs=server.createobject("adodb.recordset") sqllist="select top "&shu&" id,Ntitle from s_news where NType =2 order by id desc" rs.open sqllist,conn,1,1 if not rs.eof then do while not rs.eof response.write(""&rs("Ntitle")&"
") rs.movenext loop else response.write("暂无信息!") end if rs.close : set rs=nothing End Function %> 人民体育出版社,人民体育出版社网站,网上图书,体育教程,特价书,书籍,人民体育出版社官方网站