时间:2021-07-01 10:21:17 帮助过:46人阅读
asp分页基础类XDownPage2.0只支持oracle,而 2.10已经能够支持sqlserver了。本例将演示XDownPage2.10对于sqlserver数据库的分页方法。 1 , 分页程序代码 请详见另一篇文章 :http://blog.csdn.net/precipitant/archive/2006/11/15/1386541.aspx 2, conn.asp
asp分页基础类XDownPage2.0只支持oracle,而 2.10已经能够支持sqlserver了。本例将演示XDownPage2.10对于sqlserver数据库的分页方法。
1 , 分页程序代码
请详见另一篇文章:http://blog.csdn.net/precipitant/archive/2006/11/15/1386541.aspx
2 , conn.asp(数据库连接相关的程序)
'https://www.gxlcms.com/==================================================https://www.gxlcms.com/
'https://www.gxlcms.com/ 数据库访问https://www.gxlcms.com/
'https://www.gxlcms.com/==================================================https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/建立数据库连接https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/dimhttps://www.gxlcms.com/ conn https://www.gxlcms.com/'https://www.gxlcms.com/数据库连接对象https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/sethttps://www.gxlcms.com/ connhttps://www.gxlcms.com/=https://www.gxlcms.com/server.createobject(https://www.gxlcms.com/"https://www.gxlcms.com/ADODB.CONNECTIONhttps://www.gxlcms.com/"https://www.gxlcms.com/)
https://www.gxlcms.com/subhttps://www.gxlcms.com/ openConn
connstrhttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/Provider=sqloledb;Data Source=127.0.0.1;Initial Catalog=it;User Id=it_manage;Password=it_manage;https://www.gxlcms.com/"https://www.gxlcms.com/
conn.open connstr
https://www.gxlcms.com/end subhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/清除数据库连接https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/subhttps://www.gxlcms.com/ CloseConn
conn.Close()
https://www.gxlcms.com/sethttps://www.gxlcms.com/ connhttps://www.gxlcms.com/=https://www.gxlcms.com/nothinghttps://www.gxlcms.com/
https://www.gxlcms.com/end subhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/关闭打开的记录集https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/subhttps://www.gxlcms.com/ CloseRS(byref recordset)
recordset.close()
https://www.gxlcms.com/sethttps://www.gxlcms.com/ recordsethttps://www.gxlcms.com/=https://www.gxlcms.com/nothinghttps://www.gxlcms.com/
https://www.gxlcms.com/end subhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/获得当前虚拟目录的名字https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/functionhttps://www.gxlcms.com/ getRoot()
urlhttps://www.gxlcms.com/=https://www.gxlcms.com/Request.ServerVariables(https://www.gxlcms.com/"https://www.gxlcms.com/URLhttps://www.gxlcms.com/"https://www.gxlcms.com/)
urlhttps://www.gxlcms.com/=https://www.gxlcms.com/righthttps://www.gxlcms.com/(url,https://www.gxlcms.com/lenhttps://www.gxlcms.com/(url)https://www.gxlcms.com/-https://www.gxlcms.com/1https://www.gxlcms.com/)
getRoothttps://www.gxlcms.com/=https://www.gxlcms.com/ https://www.gxlcms.com/midhttps://www.gxlcms.com/(url,https://www.gxlcms.com/1https://www.gxlcms.com/,https://www.gxlcms.com/instrhttps://www.gxlcms.com/(url,https://www.gxlcms.com/"https://www.gxlcms.com//https://www.gxlcms.com/"https://www.gxlcms.com/)https://www.gxlcms.com/-https://www.gxlcms.com/1https://www.gxlcms.com/)
https://www.gxlcms.com/end functionhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/---------------- 数据库排序 start ---------------------------https://www.gxlcms.com/
https://www.gxlcms.com/ sImageDir https://www.gxlcms.com/=https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com//https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/&https://www.gxlcms.com/ getRoot() https://www.gxlcms.com/&https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com//images/https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/'https://www.gxlcms.com/图片路径https://www.gxlcms.com/
https://www.gxlcms.com/ upOrderFlag https://www.gxlcms.com/=https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/'https://www.gxlcms.com/升序排列显示图标https://www.gxlcms.com/
https://www.gxlcms.com/ downOrderFlag https://www.gxlcms.com/=https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/'https://www.gxlcms.com/降序排列显示图标https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/'https://www.gxlcms.com/获得当前连接的排序方向https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/functionhttps://www.gxlcms.com/ getOrderDir(fn,ofn,oDir)
https://www.gxlcms.com/dimhttps://www.gxlcms.com/ tDir
tDirhttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/deschttps://www.gxlcms.com/"https://www.gxlcms.com/
https://www.gxlcms.com/ifhttps://www.gxlcms.com/(https://www.gxlcms.com/lcasehttps://www.gxlcms.com/(fn)https://www.gxlcms.com/=https://www.gxlcms.com/lcasehttps://www.gxlcms.com/(ofn)) https://www.gxlcms.com/thenhttps://www.gxlcms.com/
https://www.gxlcms.com/ifhttps://www.gxlcms.com/(https://www.gxlcms.com/lcasehttps://www.gxlcms.com/(oDir)https://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/aschttps://www.gxlcms.com/"https://www.gxlcms.com/) https://www.gxlcms.com/thenhttps://www.gxlcms.com/
tDirhttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/deschttps://www.gxlcms.com/"https://www.gxlcms.com/
https://www.gxlcms.com/elsehttps://www.gxlcms.com/
tDirhttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/aschttps://www.gxlcms.com/"https://www.gxlcms.com/
https://www.gxlcms.com/endhttps://www.gxlcms.com/ https://www.gxlcms.com/ifhttps://www.gxlcms.com/
https://www.gxlcms.com/endhttps://www.gxlcms.com/ https://www.gxlcms.com/ifhttps://www.gxlcms.com/
getOrderDirhttps://www.gxlcms.com/=https://www.gxlcms.com/tDir
https://www.gxlcms.com/end functionhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/书写排序指示图标https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/functionhttps://www.gxlcms.com/ writeOrderDir(fn,ofn,oDir)
https://www.gxlcms.com/dimhttps://www.gxlcms.com/ tDir
https://www.gxlcms.com/ifhttps://www.gxlcms.com/(https://www.gxlcms.com/lcasehttps://www.gxlcms.com/(fn)https://www.gxlcms.com/=https://www.gxlcms.com/lcasehttps://www.gxlcms.com/(ofn)) https://www.gxlcms.com/thenhttps://www.gxlcms.com/
https://www.gxlcms.com/ifhttps://www.gxlcms.com/(https://www.gxlcms.com/lcasehttps://www.gxlcms.com/(oDir)https://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/aschttps://www.gxlcms.com/"https://www.gxlcms.com/) https://www.gxlcms.com/thenhttps://www.gxlcms.com/
tDirhttps://www.gxlcms.com/=https://www.gxlcms.com/UpOrderFlag
https://www.gxlcms.com/elsehttps://www.gxlcms.com/
tDirhttps://www.gxlcms.com/=https://www.gxlcms.com/downOrderFlag
https://www.gxlcms.com/endhttps://www.gxlcms.com/ https://www.gxlcms.com/ifhttps://www.gxlcms.com/
https://www.gxlcms.com/endhttps://www.gxlcms.com/ https://www.gxlcms.com/ifhttps://www.gxlcms.com/
writeOrderDirhttps://www.gxlcms.com/=https://www.gxlcms.com/tDir
https://www.gxlcms.com/end functionhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/添加排序列头https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/subhttps://www.gxlcms.com/ WriteOrderHeader(pHeaderTitle,pOrderField,tOrderField,tOrderDir)
Response.Write https://www.gxlcms.com/"https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/&https://www.gxlcms.com/ pOrderField https://www.gxlcms.com/&https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/','https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/&https://www.gxlcms.com/ getOrderDir(pOrderField,tOrderField,tOrderDir) https://www.gxlcms.com/&https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/')"" class='noticetitle' style='width:90%;cursor:default'>https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/&https://www.gxlcms.com/ pHeaderTitle https://www.gxlcms.com/&https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/ https://www.gxlcms.com/&https://www.gxlcms.com/ writeOrderDir(pOrderField,tOrderField,tOrderDir) https://www.gxlcms.com/&https://www.gxlcms.com/ https://www.gxlcms.com/"https://www.gxlcms.com/https://www.gxlcms.com/https://www.gxlcms.com/"https://www.gxlcms.com/
https://www.gxlcms.com/end subhttps://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/---------------- 数据库排序 end ---------------------------https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
3 , main.asp(主程序)
https://www.gxlcms.com/
https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com/<%https://www.gxlcms.com/...https://www.gxlcms.com/
https://www.gxlcms.com/'https://www.gxlcms.com/故障类别管理https://www.gxlcms.com/
'https://www.gxlcms.com/writer:northsnowhttps://www.gxlcms.com/
'https://www.gxlcms.com/create date :051211https://www.gxlcms.com/
https://www.gxlcms.com/https://www.gxlcms.com/%>https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com///https://www.gxlcms.com/执行查询前将查询条件写到隐藏表单https://www.gxlcms.com/
https://www.gxlcms.com/functionhttps://www.gxlcms.com/ query()
https://www.gxlcms.com/...https://www.gxlcms.com/{
https://www.gxlcms.com/varhttps://www.gxlcms.com/ oFormHiddenhttps://www.gxlcms.com/=https://www.gxlcms.com/document.frmHidden;
https://www.gxlcms.com/ifhttps://www.gxlcms.com/(https://www.gxlcms.com/!https://www.gxlcms.com/oFormHidden) https://www.gxlcms.com/returnhttps://www.gxlcms.com/ https://www.gxlcms.com/falsehttps://www.gxlcms.com/;
oFormHidden.currentpage.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/""https://www.gxlcms.com/;
oFormHidden.flag.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/queryhttps://www.gxlcms.com/"https://www.gxlcms.com/;
oFormHidden.err_type_name.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/frmList.err_type_name.value;
oFormHidden.err_type_code.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/frmList.err_type_code.value;
oFormHidden.submit();
}https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com///https://www.gxlcms.com/重置查询条件https://www.gxlcms.com/
https://www.gxlcms.com/functionhttps://www.gxlcms.com/ myreset()
https://www.gxlcms.com/...https://www.gxlcms.com/{
frmList.err_type_name.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/""https://www.gxlcms.com/;
frmList.err_type_code.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/""https://www.gxlcms.com/;
}https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com///https://www.gxlcms.com/执行动态排序https://www.gxlcms.com/
https://www.gxlcms.com/functionhttps://www.gxlcms.com/ gotoOrder(uOrderField,uOrderDir)
https://www.gxlcms.com/...https://www.gxlcms.com/{
frmHidden.currentpage.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/1https://www.gxlcms.com/"https://www.gxlcms.com/;
frmHidden.flag.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/"https://www.gxlcms.com/queryhttps://www.gxlcms.com/"https://www.gxlcms.com/;
frmHidden.orderField.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/uOrderField;
frmHidden.orderDir.valuehttps://www.gxlcms.com/=https://www.gxlcms.com/uOrderDir;
frmHidden.submit();
}https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com/}https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com/<%https://www.gxlcms.com/...https://www.gxlcms.com/ https://www.gxlcms.com/'https://www.gxlcms.com/on error resume next https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/'https://www.gxlcms.com/获取参数https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/dimhttps://www.gxlcms.com/ err_type_name,err_type_code
https://www.gxlcms.com/dimhttps://www.gxlcms.com/ currentpage,flag,pagesize,rsTotalCount,orderDir,orderField
currentpagehttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request.form(https://www.gxlcms.com/"https://www.gxlcms.com/currentpagehttps://www.gxlcms.com/"https://www.gxlcms.com/))
div_phttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request(https://www.gxlcms.com/"https://www.gxlcms.com/div_phttps://www.gxlcms.com/"https://www.gxlcms.com/))
flaghttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request(https://www.gxlcms.com/"https://www.gxlcms.com/flaghttps://www.gxlcms.com/"https://www.gxlcms.com/))
pagesizehttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request(https://www.gxlcms.com/"https://www.gxlcms.com/pagesizehttps://www.gxlcms.com/"https://www.gxlcms.com/))
rsTotalCounthttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request(https://www.gxlcms.com/"https://www.gxlcms.com/rsTotalCounthttps://www.gxlcms.com/"https://www.gxlcms.com/))
orderDirhttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(Request(https://www.gxlcms.com/"https://www.gxlcms.com/orderdirhttps://www.gxlcms.com/"https://www.gxlcms.com/))
orderFieldhttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(Request(https://www.gxlcms.com/"https://www.gxlcms.com/orderfieldhttps://www.gxlcms.com/"https://www.gxlcms.com/))
err_type_codehttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request(https://www.gxlcms.com/"https://www.gxlcms.com/err_type_codehttps://www.gxlcms.com/"https://www.gxlcms.com/))
err_type_namehttps://www.gxlcms.com/=https://www.gxlcms.com/trimhttps://www.gxlcms.com/(request(https://www.gxlcms.com/"https://www.gxlcms.com/err_type_namehttps://www.gxlcms.com/"https://www.gxlcms.com/))
https://www.gxlcms.com/https://www.gxlcms.com/%>https://www.gxlcms.com/
https://www.gxlcms.com/ https://www.gxlcms.com/
https://www.gxlcms.com/https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/
https://www.gxlcms.com/