Returning a DataTable from an EntityCollection

Posts   
 
    
lotek
User
Posts: 56
Joined: 14-Sep-2005
# Posted on: 14-Sep-2005 22:23:50   

Is there anyway to return a datatable from an entitycollection?

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 15-Sep-2005 03:08:26   

if you are using selfservicing then you can use the .GetMultiAsDataTable method. Otherwise with adapter I believe you will need to use the ExecuteMultiRowDataTableRetrievalQuery method of the DataAccessAdapter.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 15-Sep-2005 09:20:27   

bclubb wrote:

if you are using selfservicing then you can use the .GetMultiAsDataTable method. Otherwise with adapter I believe you will need to use the ExecuteMultiRowDataTableRetrievalQuery method of the DataAccessAdapter.

On adapter, you'd use FetchTypedList() wink as you can simply pass the fields of an entity to the method and it will fetch the data into the passed in datatable simple_smile

Frans Bouma | Lead developer LLBLGen Pro
erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 15-Sep-2005 13:48:38   

Ran across this thread with some code

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3861