Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 29th, 2006, 05:23 AM
Friend of Wrox
Points: 686, Level: 9
Points: 686, Level: 9 Points: 686, Level: 9 Points: 686, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Kolkata, West Bengal, India.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default String comparison

Hi,
I have a page where records are displayed from the database in order of the address.the address are like:
1 Carragh Park - 1 record
2 Carragh Park - 4 records
4 Carragh Park-4 records
6 Carragh Park-6 records

all records of on address should display in one page

e.g. 1st page 1 Carragh Park -1 record
2nd page 2 Carragh Park- 4 records
3rd page 3 Carragh Park - 4 records
and correspondingly

I'm giving a page braek using:

<div style="page-break-after: always;"></div>

the entire display is being done using do while not rs.eof

what should be my if condition to put the page breaks

the address field is: rs("hsenumxtownland")


Can anyone pleasee out.?????
 
Old June 29th, 2006, 06:01 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

You could create a variable to store the address and then compare the new address to it each time you loop...
Code:
Dim storeAddress: storeAddress = ""
Do Until rs.EOF
    Dim address: address = rs("hsenumxtownland")
    If storeAddress <> "" And storeAddress <> address Then
        ' ----- WRITE PAGE BREAK -----
        storeAddress = address
    End If
    ' ----- DO OTHER STUFF -----
Loop
HTH,

Chris





Similar Threads
Thread Thread Starter Forum Replies Last Post
JSTL String comparison probem! Plzzz help !! shimmeringtrinkets JSP Basics 0 February 26th, 2008 10:05 AM
Fuzzy string comparison (2) kobus XSLT 2 October 11th, 2004 07:28 AM
fuzzy string comparison kobus XSLT 0 September 22nd, 2004 05:47 AM
Please Help - Tricky String Comparison ank2go SQL Server 2000 1 February 6th, 2004 09:57 PM
String Comparison rylemer Pro VB 6 9 July 29th, 2003 06:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.