Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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

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.?????
Reply With Quote
  #2 (permalink)  
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

You could create a variable to store the address and then compare the new address to it each time you loop...
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 -----


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 04:54 PM.

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