Join together disconnected recordsets with SQL statement 
Author Message
 Join together disconnected recordsets with SQL statement

I have 2 recordsets which I have created dynamically, using ADO disconnected recordsets and the contents of a couple of 2 dimensional arrays, (without connecting to any  database)

Can/How do I run a SQL query joining the 2 recordsets to return a third dynamic recordset?

Jeff Clayton.

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Mon, 26 Jan 2004 23:03:20 GMT  
 Join together disconnected recordsets with SQL statement
Hi,

No, you cannot (at least in this version of ADO). ADO does
not support relations between recordsets (ADO.NET will do
it). You need to write some code to synchronize your
recordsets. Check Filter property of Recordset object. It
will help you. When you select record in first recordset
you can filter second one with related records.

Val

Quote:
>-----Original Message-----
>I have 2 recordsets which I have created dynamically,

using ADO disconnected recordsets and the contents of a
couple of 2 dimensional arrays, (without connecting to
any  database)
Quote:

>Can/How do I run a SQL query joining the 2 recordsets to

return a third dynamic recordset?
Quote:

>Jeff Clayton.

>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.



Mon, 26 Jan 2004 23:20:32 GMT  
 Join together disconnected recordsets with SQL statement
There is no way to join two recordsets into one using SQL, using the
current release of ADO. This would have to be done as follows:

1. Open recordset A
2. Open recordset B
3. Create recordset C in code,
4. Using VB, read records from A and B into C.

Sorry I don't have a better answer!

Steven Bras, MCSD
Microsoft Developer Support
Visual Basic WebData



Tue, 27 Jan 2004 07:07:18 GMT  
 Join together disconnected recordsets with SQL statement
Quote:
> I have 2 recordsets which I have created dynamically, using ADO

disconnected recordsets and the contents of a couple of 2

Quote:
> dimensional arrays, (without connecting to any  database)
> Can/How do I run a SQL query joining the 2 recordsets to return a third
dynamic recordset?
> Jeff Clayton.

Jeff,

Why not use a shaped (hierarchical) recordset?  Then you get the recordsets
in one call, already joined.

Jeff Jones



Fri, 30 Jan 2004 23:08:54 GMT  
 Join together disconnected recordsets with SQL statement
Quote:
> I have 2 recordsets which I have created dynamically, using ADO

disconnected recordsets and the contents of a couple of 2

Quote:
> dimensional arrays, (without connecting to any  database)
> Can/How do I run a SQL query joining the 2 recordsets to return a third
dynamic recordset?
> Jeff Clayton.

Jeff,

Why not use a shaped (hierarchical) recordset?  Then you get the recordsets
in one call, already joined.

Jeff Jones



Fri, 30 Jan 2004 23:09:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Disconnected Recordset: Not editable SQL-JOIN used

2. Disconnected Recordset: Not editable SQL-JOIN used

3. Disconnected Recordset: Not editable SQL-JOIN used

4. Run SQL Statement Against Disconnected ADO Recordset

5. running an SQL statement on a disconnected recordset

6. Joining recordsets together?

7. Joining recordsets together?

8. Disconnected recordsets deleting data from joined tables

9. join between 2 disconnected recordsets

10. Update recordset with join statement

11. Recordset Experts...SQL statement on an open recordset?

12. Multiple Joins SQL Statement

 

 
Powered by phpBB® Forum Software