Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data-object requring data from another object
Message
 
To
23/01/2003 06:59:13
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00744668
Message ID:
00744688
Views:
7
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
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform