Question on Object Structure

Question on Object Structure

Old forum URL: forums.lhotka.net/forums/t/795.aspx


Bonio posted on Thursday, August 03, 2006

Hi All

I have a question about filling an object. The object in question handles Customers and it is made up as follows:

Customer (EO)

   -   CustomerContactList(ECL)

         - CustomerContact(EC)

               - PhoneList (ECL)

                     -PhoneContact(EC)

 

It is a bit complicated, but is required. I can load the Customer, CustomerContactList and associated CustomerContacts from one stored proc, however, I am unable to get the PhoneContacts from the sp.

What I do for the PhoneList is to load them individually from a separate sp as each CustomerContact is filled. The problem I have found is that because the PhoneList does not use the same connection as the rest of the fetch, I get a 'DTC is not installed on the server' error. Question is: do I need to use TransactionScope for fetch operations and is there a more logically way for producing what I am trying to do???

TIA

-Bonio-

xal replied on Thursday, August 03, 2006

No, you definitely don't need transactions for fetching data...
You can also pass the connection around as you would when you save data.
Another viable option is to create a strongly typed dataset with relations, and fill that with just one sproc.
And then, you pass around datarows, and grand children would be loaded by navigating the datarow relations....

Andrés

Copyright (c) Marimer LLC