亚洲AV无码乱码在线观看不卡|最新大伊香蕉精品视频在线|亚洲不卡av一区二区|国产美女无遮挡免费

登錄論壇 | 注冊(cè)會(huì)員 設(shè)為首頁 | 收藏本站
當(dāng)前位置 : 首頁>軟件學(xué)院>程序開發(fā)>ASP教程>正文
 
ASP教程:自己寫的數(shù)據(jù)庫操作類

http://m.yibo1263.com 2010-3-16 8:26:13  來源:東北IT網(wǎng)  編輯:葉子
 

    strsql=strsql&") "&vOrderBy
    end if
    '-------------------------------------------------------------------
    set pageRs=server.CreateObject("adodb.recordset")
    pageRs.open strsql,conn,0,1
    errMsg "記錄分頁"
    end function
'------sql用存儲(chǔ)過程分頁------------------------------------------------------
public function sqlPage()
on error resume next
Set sqlPage=server.CreateObject("Adodb.RecordSet")
Set Cm=Server.CreateObject("Adodb.Command")
Cm.CommandType = 4
Cm.ActiveConnection = conn
Cm.CommandText="sp_Util_Page"
Cm.parameters(1) = vPgFields
Cm.parameters(2) = vTbName
Cm.parameters(3) = vConditions
Cm.parameters(4) = vOrderBy
Cm.parameters(5) = vPKey
Cm.parameters(6) = vCurrPg
Cm.parameters(7) = vPgSize
Cm.parameters(8) = vRsCount()
Cm.parameters(9) = ""
sqlPage.CursorLocation = 3
sqlPage.LockType = 1
sqlPage.Open Cm
errMsg "記錄分頁"
end function
'----------------------------------------------------------------------------
'關(guān)閉記錄集objRs
'----------------------------------------------------------------------------
    Public Function cRs(ByVal ObjRs)
    ObjRs.close()
    Set ObjRs = Nothing
    End Function
'----------------------分頁的頁碼導(dǎo)航---------------------------------------
public function pageNav()
iRsCount=vRsCount()'總記錄數(shù)
mypage=vCurrPg'當(dāng)前頁數(shù)
PgCount=vPgCount()'總頁數(shù)
prePage=mypage-1
if prePage<1 then
prePage=1
end if
nextPage=mypage+1
if nextPage>PgCount then
nextPage=PgCount
end if
pagestr="<div id=""fy""><span id=""rpc"">總共有"&iRsCount&"條記錄  "&mypage&"/"&PgCount&"</span>"
pagestr=pagestr&"<a href='?currpage=1' class='aW'>首頁</a><a href='?currpage="&prePage&"' class='aW'>前一頁</a>"
if (mypage-1) mod 4=0 then
firstPage=mypage
elseif int((mypage-1)/4)=0 then
firstPage=1
else
firstPage=int((mypage-1)/4)*4+1
end if
endPage=firstPage+4
astr=""
for i=firstPage to endPage
astr=astr&"<a href='?currpage="&i&"'"
if Cstr(mypage)=Cstr(i) then
astr=astr&" id='currP'"
end if
astr=astr&">"&i&"</a>"
if i>PgCount-1 then exit for
next
astr=astr&"<a href='?currpage="&nextPage&"' class='aW'>后一頁</a><a href='?currpage="&PgCount&"' class='aW'>尾頁</a></div>"
pagestr=pagestr&astr
pageNav=pagestr
end function
'輸出帶分頁功能的table
Function showTb(ByVal TbTil)
    set rsTb=pageRs()'若是存儲(chǔ)過程就調(diào)用sqlPage()
    tbRs= rsTb.getrows()
    cRs(rsTb)
    iTblRow=Ubound(tbRs,2)
    iTblCol=Ubound(TbTil)
    tbStr="<table border='0' cellspacing='0' cellpadding='0'><tbody>"
    for r1=0 to iTblCol
      tr1=tr1&"<td width='"&split(TbTil(r1),"|")(1)&"'>"&split(TbTil(r1),"|")(0)&"</td>"

本新聞共5頁,當(dāng)前在第4頁  1  2  3  4  5  

 
收藏】【打印】【進(jìn)入論壇
  相關(guān)文章:

·解決頁面延遲的兩個(gè)方法
·ASP教程:ASP簡(jiǎn)介 

 
 
 
 
最新文章

中關(guān)村艷照門女主角詳記錄高清組圖 
大連護(hù)士門大尺度艷照高清組圖
iPhone女孩微博爆紅 最寶貴東西換iPhon
反恐精英之父內(nèi)維爾:改變電腦游戲銷售
團(tuán)購網(wǎng)站黎明之前:中國市場(chǎng)慘烈廝殺不
團(tuán)購鼻祖Groupon中國揭秘:快與慢的商業(yè)
Spil Games發(fā)布新的品牌形象
1800配置一臺(tái)主機(jī) 不要顯示器
聯(lián)想V360筆記本模特寫真
愛國者第四代移動(dòng)硬盤將面市、低電壓保

 
推薦文章
1
2
3
4
5
6
7
8
9
10
iPhone女孩微博爆紅 最寶貴東西換
大連護(hù)士門大尺度艷照高清組圖
中關(guān)村艷照門女主角詳記錄高清組
蘋果員工中毒門
宮如敏不雅照瘋傳 看張馨予韓一菲
深耕市場(chǎng) 永續(xù)經(jīng)營——專訪百腦匯
優(yōu)派專業(yè)電子書 讓您回家旅途多姿
揭曉百萬大獎(jiǎng)三星bada魅力綻放中
大明龍權(quán)“江湖英雄會(huì)”全國PK大
永恒之塔校園達(dá)人挑戰(zhàn)賽完美落幕
八卦圖解 More>>
iPhone女孩微博爆紅 最寶貴東西換 大連護(hù)士門大尺度艷照高清組圖
中關(guān)村艷照門女主角詳記錄高清組 宮如敏不雅照瘋傳 看張馨予韓一菲