Home All Groups Group Topic Archive Search About

How to put the result of 2 DataReader in a DataList??

Author
11 Mar 2005 9:16 AM
ola
Hi to all,

I am working on an e-commerce site , and Im trying to show a documents
historic to the user.So the idea is to have a table like this:

Orders    Deliveries          Invoices ...
----------------------------------------------
123        4125               5214
           1236               5214
           5214               63214
-----------------------------------------------
854        854                8541
           85478              89654
                              8745
-----------------------------------------------


So i have many procedures to get these informations .
1) Get the list of orders numbers
2)for each order , get the list of deliveries
3)for each order ,get the list of invoices

In the table we have for exemple an order (in orders column) , and all
the Deliveries that correspond to this order(in Deliveries column) ,
all the invoices that correspond to the orders and Deliveries (in the
invoices column).

So i can't bind my DataList to one simple SQLDataReader , because i
have many procedure .How can i do this??
Thank you for any idea

Author
15 Mar 2005 3:02 AM
Jason Bentley
It sounds like you would be better served with a DataSet. You could
load all the data into one dataset, set your DataRelations between
tables and you can get the child rows of each parent row easily, and it
would be a much cleaner solution with a much easier implementation.
Check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdataset.asp
for an overview of the ADO.NET.

Jason Bentley
http://geekswithblogs.net/jbentley