Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to merge ADODB recordsets - Crystal
Message
From
02/05/2002 12:00:09
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
How to merge ADODB recordsets - Crystal
Miscellaneous
Thread ID:
00651950
Message ID:
00651950
Views:
71
I have a Crystal report that is currently used with access. It takes multiple queries to get to the final query that populates the report.

I am trying to move the report to use in a VB app instead of access. I have changed the report datasource to a ttx file and now I need to figure out how to merge multipe recordsets into 1. I considered continuing to use the dao queries but it takes 2 - 3 minutes to run the report from VB and we are eventually going to be switching to SQL. I am attempting to get as much as done now so that in 3 months when we switch over there will not be a delay in running reports.

Here is a sample of my access code:

sql = "SELECT FOB_Customer_Header.*, Customer.Name, Address.Line1, Address.Line2, Address.City, Address.State, " & _
"Address.Zip, Address.Phone, Address.Fax, Address.Country " & _
"FROM (Customer INNER JOIN FOB_Customer_Header ON Customer.Customer = FOB_Customer_Header.Customer) " & _
"INNER JOIN Address ON Customer.Customer = Address.Customer " & _
"WHERE (Address.Ship_To_ID = 'Main') " & _
"AND FOB_Customer_Header.qhIndex = " & v_Customer & " "

Set QueryDef = CurrentDb.CreateQueryDef("d_Customer_Quote_1", sql)

sql = "SELECT d_Customer_Quote_1.*, Contact.Contact_Name as Buyer_Name " & _
"FROM d_Customer_Quote_1 LEFT JOIN Contact ON d_Customer_Quote_1.Buyer = Contact.Contact;"

Set QueryDef = CurrentDb.CreateQueryDef("d_Customer_Quote_2", sql)

sql = "SELECT d_Customer_Quote_2.*, Contact.Contact_Name as Buyer_Name2 " & _
"FROM d_Customer_Quote_2 LEFT JOIN Contact ON d_Customer_Quote_2.Buyer2 = Contact.Contact;"

Set QueryDef = CurrentDb.CreateQueryDef("d_Customer_Quote_3", sql)

*******************

d_Customer_Quote_3 would be what I am trying to send to Crystal as 1 ado recordset.

I would appreciate any help.

Thanks
Nichole
Next
Reply
Map
View

Click here to load this message in the networking platform