<% Const adOpenStatic = 3 Const adLockReadOnly = 1 Const adCmdText = &H0001 Dim iPageSize 'How big our pages are Dim iPageCount 'The number of pages we get back Dim iPageCurrent 'The page we want to show Dim strOrderBy 'A fake parameter used to illustrate passing them Dim strSQL 'SQL command to execute Dim MyConn 'The ADODB connection object Dim Rs 'The ADODB recordset object Dim iRecordsShown 'Loop controller for displaying just iPageSize records Dim I 'Standard looping var Dim StrWhere ' Get parameters iPageSize = 9' You could easily allow users to change this ' Retrieve page to show or default to 1 If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If strSQL = "SELECT Concern_Name,Off_Addr, Off_Ph,Mc_Type,Head,No_Colors,No_MC,Party_No FROM Party_Embroid ORDER BY Party_No" On Error Resume Next ' Create and open our connection Set MyConn = Server.CreateObject("ADODB.Connection") MyConn.Open "DSN=jobwork123" ' Create recordset and set the page size Set Rs = Server.CreateObject("ADODB.Recordset") Rs.PageSize = iPageSize ' You can change other settings as with any RS 'Rs.CursorLocation = adUseClient Rs.CacheSize = iPageSize ' Open RS Rs.Open strSQL, MyConn, adOpenStatic, adLockReadOnly, adCmdText ' Get the count of the pages using the given page size iPageCount = Rs.PageCount If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 ' Check page count to prevent bombing when zero results are returned! Rs.AbsolutePage = iPageCurrent %>

 

                            Knitting        All Jobwork        Tirupur           Websites         About Us        Contact Us       Enquiry



Knitting    

Embroidery      

Compacting      

Dyeing

Rotary Printing       



Yarn Merchants 

Commputer Cutting Mc

Yarn Dyeing

Checking

Others


Back To Knitting Search

 

                     


Home  |  Knitting  |  WebHosting  |  Tiruppur  |  Advertise  |  Supports  |   About Us  |  Link to Us
 

© 2004 - 2005 Jobwork.net . All rights reserved