Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data-object requring data from another object
Message
De
23/01/2003 09:07:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00744668
Message ID:
00744698
Vues:
11
Thanks for the reponse, however, I don't think I described the problem correctly.

What I really wanted to know is the way to communicate with DO2, is it ok to just do a CREATEOBJECT from within DO1 and then reference DO2 that way?

Thanks
Kev

>Hi Kevin. There are various ways to do this, depending on the situation.
>
>If the data in DO2 consists of just a few records, I tend to convert it to XML and pass the XML out to DO1. Then, DO1 converts from XML into whatever format it wants to use (if necessary). Depending on what you are using to hold data -- cursors, recordsets, properties, or temp tables [yuck] -- the exact syntax for converting to and from XML will vary.
>
>If the data in DO2 consists of many records (thousands, for instance), I tend to write the data to a table and then pass DO1 some sort of identifier to query the table. This might be a temporary table name in SQL Server or VFP (though I don't recommend this approach) or it might be some sort of integer id that identifies records in a pre-existing table that I simply use to hold and retrieve data.
>
>The second approach is cumbersome and in those cases, I really prefer to reconsider the design if possible (which, unfortunately, isn't always possible depending on the shop, the other apps that DO2 and DO1 are used for, etc.)
>
>Hope this helps.
>>Hi
>>
>>2 Data-objects - DO1 and DO2.
>>
>>My app's data-objects are held in a VFP COM, DO1 needs some data from DO2, what would be the best way to do this?
>>
>>If DO1 is created, what is the best way to query DO2 from within DO1?
>>
>>Hope that makes sense.
>>Thanks
>>Kev
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform