On 11/28/07, Kai Bøhli <[EMAIL PROTECTED]> wrote:
> Can this be now be done to return a single datasets with two table adapters:
>
> Select * from master;
>
> Select * from detail;
Yes. Just create your dataset in VS and create two tables and for each
the tableadapter. No problem at all. In VS the dataset is collection
of datatables (so you can have more than one table in dataset). You
can then fill it with Fill method of tableadapter.
>
>
> The reason for asking this is that it will greatly simplify my work with
> Firebird. As it is now, I have to do this:
>
> 1) Create a class for holding orders.
>
> 2) Add a property to this class with holds a collection of details
>
> 3) Create a class for holding the details.
>
> 4) Create a generic collection class for the master
>
> 5) Use a datareader to fetch the data for the master into a generic
> collection.
>
> 6) Use a datareader to fetch the data for the detail (inside the
> property in nr. 2 above)
Yes, it the "classic" procedure when you're using your own objects.
BTW TableAdapters are using DataReaders inside too. ;)
> This works (sometimes great) usually well, but it's a lot of work, and I
> also have to run through the collections and update the database manually.
Somebody likes it, 'cause (s)he can create any magic logic in objects.
A lot of people are writing generators of classes. Depends on every
developer, what (s)he likes.
--
Jiri {x2} Cincura (Microsoft Student Partner)
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider