E
Ersin Gençtürk
hi ,
I am using ado.net with typed datasets and typed datatables
my question is about how to handle child / parent type tables with datasets.
For instance say that I have 2 tables with columns :
table Topic: (parent table)
TopicId
TopicName
CreateDate
table Message : (child table)
MessageId
TopicId
Message
CreateDate
When I need to use these 2 tables from the asp.net code I am using
databinding to bind data to a datagrid
My problem starts here because :
When I need these two tables in joined way . (say that I am listing messages
in the datagrid and I need TopicName in each row)
In classic way , it is easy join these two tables and write the necessary
databinding code.
select Message.*, Topic.TopicName from Message inner join Topic on
Message.TopicId=Topic.TopicId
But when I use typed datasets How should I fill these two tables ? ( You
can say that fill these 2 tables seperately but what if I need only the
TopicName column ? isn't it a performance decrease for the system ? do I
have to ignore it ? ) Also I would like to benefit from typed dataset
architecture.
Is there any good document or web page address about this issue ? How should
I write stored procedures ?
I am using ado.net with typed datasets and typed datatables
my question is about how to handle child / parent type tables with datasets.
For instance say that I have 2 tables with columns :
table Topic: (parent table)
TopicId
TopicName
CreateDate
table Message : (child table)
MessageId
TopicId
Message
CreateDate
When I need to use these 2 tables from the asp.net code I am using
databinding to bind data to a datagrid
My problem starts here because :
When I need these two tables in joined way . (say that I am listing messages
in the datagrid and I need TopicName in each row)
In classic way , it is easy join these two tables and write the necessary
databinding code.
select Message.*, Topic.TopicName from Message inner join Topic on
Message.TopicId=Topic.TopicId
But when I use typed datasets How should I fill these two tables ? ( You
can say that fill these 2 tables seperately but what if I need only the
TopicName column ? isn't it a performance decrease for the system ? do I
have to ignore it ? ) Also I would like to benefit from typed dataset
architecture.
Is there any good document or web page address about this issue ? How should
I write stored procedures ?