Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to repair leaf ASP paging class Bug

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "how to repair leaf ASP paging class Bug". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1 'this is to correct the bug of Eof if there are many access records and there is only one record on the last page. The disadvantage is that the last page will show 2 = _ _ =

2IfiPageIndex > 1AndiPageIndex=iPageCountAnd (iRecordCountModiPageSize=1) Then

3Rs.AbsolutePositioning = (iPageIndex-1) * iPageSize

4Else

5Rs.AbsolutePositioning = (iPageIndex-1) * iPageSize+1

6EndIf

Method 1: use static cursors (i.e. oConn,1,1 is changed to oConn,3,1) viewsourceprint?1SetRs=Server.CreateObject ("Adodb.RecordSet")

2Rs.Open "SELECT" & sField& "FROM" & sTable& "& sCondition&" & sOrderBy,oConn,3,1,&H0001

3' this is to correct the bug of Eof if there are many access records and there is only one record on the last page. The disadvantage is that 2 entries will be displayed on the last page.

4Rs.AbsolutePosition= (iPageIndex-1) * iPageSize+1

How to repair leaf ASP paging class Bug

Method 2: viewsourceprint?1SetRs=Server.CreateObject ("Adodb.RecordSet")

2Rs.Open "SELECT" & sField& "FROM" & sTable& "& sCondition&" & sOrderBy,oConn,1,1,&H0001

3' this is to correct the bug of Eof if there are many access records and there is only one record on the last page. The disadvantage is that the last page will show 2 = _ _ =

4IfiPageIndex > 1andiPageIndex=iPageCountThen

5Rs.Move (iPageIndex-1) * Clng (iPageSize)

6EndIf

7Rs.AbsolutePositioning = (iPageIndex-1) * iPageSize+1

This is the end of the content of "how to repair the leaf ASP paging class Bug". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report