Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Question about ADO
Message
De
09/07/2003 16:10:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Simple Question about ADO
Divers
Thread ID:
00808675
Message ID:
00808675
Vues:
47
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform