Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
| FAQ | Members List | Calendar | 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 October 15th, 2003, 02:56 PM
Registered User
Join Date: Jun 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default one record set multiple data sources

i am trying to populate one record set using the recordset.open method, but i want to populate it from 2 data sources, not just one (using two connections) ... the add/update record proceedure does not appear practical, is there a way to just name 2 data sources when opening the record set so ONE record set is created from the two different databases also USING two different sql statements for the data sources?? I am using asp 3.0 on windows 2000 server and multiple access databases which i basically want to do multiple database search on .... yielding one search result to then manipulate further ...

will appreceiate any advice ....
Reply With Quote
  #2 (permalink)  
Old October 17th, 2003, 12:50 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Hi there,

AFAIK, there is no (easy) way to merge two Recordsets in ADO. You could do some complicated stuff by using AddNew on the first Recordset to add each record from the second Recordset. However, I think that will kill performance.

If you are able to get your data as ready as can be from the database (filtered, sorted, whatever), you could use the GetRows method of the Recordset to get your data from the Recordsets in a two-dimensional array. You can then merge these two arrays, and do some client side data manipulating (skipping duplicate records, sorting, whatever). Again, this won't be very fast, unless you're working with relatively small datasets.

I take it there is no way to merge the data in the database, so your ASP pages can retrieve data from just one connection? You could look into linking servers or databases to get your data from a single source. For example, in SQL Server, you may get away by using a UNION on two queries that retrieve data from two databases / SQL Servers.....

Hope this helps a bit,


Imar Spaanjaars
Everyone is unique, except for me.
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
Multiple Datasets from multiple Data Sources SQL_Hacker Reporting Services 1 June 18th, 2008 02:25 PM
Fill the five record only adapter to data set bhasker_braj121 ADO.NET 0 July 16th, 2007 05:12 AM
Joining data from multiple data sources ClaesR BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 August 28th, 2006 09:30 AM
Query from multiple data sources billmedd BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 September 27th, 2004 10:46 AM

All times are GMT -4. The time now is 05:37 AM.

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