Data display function (ASP)

Source: Internet
Author: User
<%
REM-----------------------------------
REM Author: Wang Qin army qinjunit@yahoo.com
REm Creation Date: 2004-10-12
REM Modification Date: Monday, January 24, 2005
REM-----------------------------------
' Function practical data paging display function
' parameter: Datasql SQL statement-----------current page data
' Parameters: Countsql-----------The SQL statement that queries the total number of bars
' Parameters: Page-----------which pages
' Parameters: PageSize-----------page times
' Parameters: theadstrings-------Display the header column name definition, separated by "," and corresponds to the column name inside the Datasql.
' Example: =======================================
' <!--#include virtual= ' inc/conn.asp '-->
' <!--#include virtual= ' inc/rw_datapager.asp '-->
' <%
' Dim ipagesize,curpage
' Ipagesize = 18
' Curpage = 1
' If (Request.Form <> "") Then
' If IsEmpty (Request.Form ("P")) then
' Curpage = 1
' ElseIf isnumeric (Request.Form ("P")) then
' Curpage = CLng (Request.Form ("P"))
' End If
' End If
' Showrecords ' exec p_show accounts, "&iPageSize&", "&CurPage&", ' Account_code,account_password, Account_serial,account_type,account_money,stock_time ' "," SELECT count (Account_code) as total from [accounts] ", CLng ( Curpage), ipagesize, "card number, password, serial number, card type, card amount, warehousing time"
' Closedb ()
'% >
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Showrecords (datasql,countsql,page,pagesize,modelstrings,theadstrings)
Dim total,rs,datmessages
Dim Usedatamodel
if (Request.Form ("Pagertotal") <> "") Then
Total = CLng (Request.Form ("Pagertotal"))
Else
Total = Conn.execute (Countsql) (0)
End If
If Len (modelstrings) <8 Then ' stencil length is defined here as 8
Usedatamodel = False
Else
Usedatamodel = True
End If
Datmessages = datmessages & "<table width=" "100%" "border=" "0" "align=" "Center" "cellpadding=" "0" "cellspacing=" "0" "style=" "Border-collapse:collapse;word-break:break-all" ">"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.