Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 October 20th, 2004, 10:00 AM
Registered User
 
Join Date: Sep 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can 2 recordsets be joined or searched?

I have 2 recordsets loaded into an ASP page..

1st is called "rs_special" which contains 1 field called "Email_Address"
The second recordset is called "rs_A55report", which contains lots of fields but one field is called "Email"

I need to display all the records in rs_A55report on my page but only the records where "Email" is also in "Email_Address" of the other recordset...

Can anyone help? i cna't join the tables in SQL as they are seperate databases unless this can be done? thanks

 
Old October 20th, 2004, 10:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

What is the Database server that you use? Is that SQL server or MS access?

_________________________
- Vijay G
Strive for Perfection
 
Old October 20th, 2004, 11:01 AM
Registered User
 
Join Date: Sep 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its MS Access

 
Old October 20th, 2004, 11:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Then you might have to have two Loops that parse through the entire recordset (both rs_special and rs_A55report)
Code:
While NOT rs_A55report.EOF
    While NOT rs_special.EOF
        If rs_A55report("Email")= rs_special("Email_Address") then
            'Display the data from rs_A55report
        End If
        rs_special.MoveNext
    Loop
    rs_A55report.MoveNext
Loop
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing results from joined tables henry-horse Classic ASP Basics 5 March 9th, 2007 07:08 AM
Load a data form with a specific searched record zpluug VB.NET 1 October 9th, 2005 05:38 AM
UPDATE with joined tables DanKent SQL Server 2000 4 July 6th, 2004 08:30 AM
inserting into joined tables cjennings SQL Server 2000 3 July 23rd, 2003 06:10 AM





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