Frog Recommended: Bi display the form demonstration of the recordset, and implements paging

xiaoxiao2021-03-06  94

<% 'Open Database Set Conn = Server.createObject ("AdoDb.Connection") StrConn = "Driver = {SQL Server}; server = localhost; database = northwind; uid = sa; pwd = sa;" conn.open strconn " acquiring page address Dim fileName, postionfileName = Request.ServerVariables ( "script_name") postion = InstrRev (fileName, "/") 1fileName = Mid (fileName, postion) 'open record set set rs = server.CreateObject ( "adodb. Recordset ") rs.open" SELECT TIOFCOURTESY, FIRSTNAME, Photopath from Employees Order By Employeeid Desc ", CONN, 1, 1%>

<% if not (rs.bof and ee) ThenPages = 4rs.pagesize = PageSif Not ISempty (Request.QueryString (" Page ")" page ")" page ")? Thispage = ClNG (Request .QueryString ( "page")) else thispage = 1end ifrscount = rs.recordcountif thispage = "" then thispage = 1if thispage <1 then thispage = 1if (thispage-1) * pages> rscount then if (rscount mod pages) = 0 THISPAGE = rscount / pages else thispage = rscount / pages 1 end = 0 the allpages = rscount / pageselse allpages = rscount / pages 1END I Frs.absolutepage = thispagei = 1%> <% do while not rs.eof and pages> 0%>
"alt =" "width =" 100 "height =" 100 "border =" 0 ">

转载请注明原文地址:https://www.9cbs.com/read-95967.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.033, SQL: 9