Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Question about ADO
Message
From
09/07/2003 16:10:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Simple Question about ADO
Miscellaneous
Thread ID:
00808675
Message ID:
00808675
Views:
48
Hey all,

I have always had a niggling question about ADO and I guess I just never delved deep enough into it to get a definitive answer for myself. So, I'll ask the experts *smile*.

Is there any way in ADO to query another ADO dataset? In other words, can someone mock up some quick code that would emulate the following VFP methodology:
* Gather all Missouri orders
SELECT * FROM Orders WHERE StateCode = 'MO' INTO CURSOR cMissouri

* Gather order codes having commissions
SELECT code, commpct FROM Codes WHERE commpct > 0.00 INTO CURSOR cComm

* Combine our data into final cursor...
SELECT cMissouri.*, cComm.commpct FROM cMissouri ;
   INNER JOIN cComm ON cMissouri.code = cComm.code ;
   INTO CURSOR cFinalData
Now, before everyone tells me this is a silly example because I could have done it all in one query or used a sub-select or blah blah blah, I know that. But there are still cases where either for performance, readability, or combining server and DBF data that this sort of coding is desired.

Can something like this be done in ADO, and if so, what is the magic method I am missing? Thanks for your help!

Thanks,
JoeK
Next
Reply
Map
View

Click here to load this message in the networking platform