<% ELSE%> Previous <% end if INTCUR = CINT (INTCUR) INTTOTAL = CINT (InteTotal)%> <% if Intcur
Next page <% else%> Next page <% end if%> div> <% rs.closset = Nothingend function% > The test page is as follows:
<% DIM conn number nextconnstr = "dbq =" server.mappath ("nwind.mdb") "; defaultdir =; driver = {Microsoft Access Driver (* .mdb)}; "SET CONN = Server.createObject (" AdoDb.Connection ") Conn.CreateObject (" AdoDb.Recordset ") Rst.Open" Select * from Orders " , CONN, 1, 1Call Fenye (RST, 7, "Orderid, Customerid, Shipvia) Rst.Closset Rst = NothingConnClosset Conn = Nothing%>
Description:
Add
Calling functions in a place to be paging: such as: Call Fenye (RST, 7, "Orderid, Customerid, Shipvia)
Function prototype: Variant Fenye (Recordset RS, Integer PageSize, String Args)
The parameters are as follows: RS: Incoming Recordsetn: Requires the number of records in each page, columns: the fields required to display the field
Doing such a paging function is because sometimes you write a paging, I feel that it is not so convenient. Every place is very wasting. I also saw that many friends are asking this question, so I wrote such a function. Let's take a look, first Write this kind of thing, I feel very low, but I hope everyone will hold. . . . . Thank you! ! ! Welcome all kinds of opinions and suggestions! By the way, this ADO's paging method, I think it is very efficient, because I will take a record set of hundreds or even thousands of records each time, if a server-side data is small. Ethere, if you are. . . . Ugh. . . So, will do a few different schematic paging functions in the future! My email: Xuchi@uibeonline.com