zoukankan      html  css  js  c++  java
  • 分页 的首页 rs.absoluteposition=rs.absoluteposition+2+((abs(wzpage)1)*wzrep) 要加2 ??

    rs.open sql,check_conn,1,3
         dim wzcount,wzrep,wzpage,wzpagecount,wzpagerep,boardstr
                     wzrep = 10
                     wzcount = check_conn.execute (sqlc,0,1)(0)
                     wzpagecount = abs(int(-abs(wzcount/wzrep)))
                     wzpage = request("page")
                  if len(wzpage) = 0 or wzpage = 0 then wzpage = 1%>
         <!--#include file="../includepage/page_dir_news.asp"-->
         <%
             if rs.recordcount<>0 then
             rs.absoluteposition=rs.absoluteposition+2+((abs(wzpage)-1)*wzrep)
             end if
             dim i
            for i = 0 to wzrep-1
            if rs.eof then exit for
    %>

    <tr <%if i mod 2<>0 then response.Write "bgcolor='#cccccc'"%>><td><%=rs("news_ID")%></td><td>
    <%set rss=server.CreateObject("adodb.recordset")
    rss.open"select top 1 News_Class_name from News_Class",check_conn,3,3
    response.Write rss("News_Class_name")
    rss.close
    set rss=nothing%></td><td><%=rs("title")%></td><td><%=rs("News_time")%></td><td><a href="editNews.asp?news_ID=<%=rs("news_ID")%>&Brands=<%=trim(rs("Brand_ID"))%>&Manufacturers=<%=trim(rs("Manufacturer_id"))%>&Models=<%=trim(rs("Model_Id"))%>&On_Market_Years=<%=trim(rs("On_Market_Year"))%>&Auto_Engines=<%=trim(rs("Auto_Engine"))%>&Auto_IDs=<%=trim(rs("Auto_ID"))%>&Country_Ids=<%=trim(rs("Country_Id"))%>&Region_Ids=<%=trim(rs("Region_Id"))%>&newsClass=<%=rs("News_Class_ID")%>&title=<%=rs("title")%>&NewsContent=<%=rs("Content")%>" target="_blank">编辑</a>&nbsp;&nbsp;<a  onClick="return  window.confirm('确定删除?');"href="?act=del&newsClass=<%=request("newsClass")%>&news_ID=<%=rs("news_ID")%>">删除</a></td></tr>
    <%rs.movenext
    next
    rs.close%>
    <tr><td align="center" colspan="5"><%=pagination(wzpagecount,newsClass)%></td></tr>

    rs.absoluteposition=rs.absoluteposition+2+((abs(wzpage)-1)*wzrep)
    不加2在首页显示时出错

    ADODB.Recordset (0x800A0BB9)
    参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

  • 相关阅读:
    *** 疑问
    *** C++动态绑定(多态)example code 1
    *** C++纯虚函数使用example code 1
    *** C++实现string各类运算符重载成员函数
    *** C++虚函数表原理相关代码
    *** 自写MyString类:重载操作符 '+'
    *** [转]C++在类的成员函数中,允许直接访问该类的成员对象的私有成员变量
    *** [转] C++基础篇--overload重载&override覆盖&overwrite隐藏
    *** C++ 中的函数重载
    *** 关于虚函数的一些常见问题
  • 原文地址:https://www.cnblogs.com/y0umer/p/3839462.html
Copyright © 2011-2022 走看看