OVH Cloud OVH Cloud

Hierarchical data with any DataReader

1 réponse
Avatar
Christopher
Hello,

I have two problems to resolve with .NET 1.1:

1. I search the good way to read hierarchical data with a SqlDataReader.
I don't know if it's possible. Must I use inevitably an
OleDbDataReader with SHAPE ... APPEND ...

2. How read hierarchical data on the same table with SQL server 2000 and
a SqlDataReader ?

Thanks for your help,

Christopher.

1 réponse

Avatar
Christophe Gricourt
solution to your 2 problems will depend on how your hierarchy is stored into
your database tables.

Could you provide a little more context of what kind of hierarchy you're
having?
- how do you want to use data once you've read it ?
- is it fixed depth hierarchy?
- is it based on a foreign key to the parent node within the same table as
the children? or do you use a "flat tree" approach?

- Christophe


Hello,

I have two problems to resolve with .NET 1.1:

1. I search the good way to read hierarchical data with a
SqlDataReader.
I don't know if it's possible. Must I use inevitably an
OleDbDataReader with SHAPE ... APPEND ...
2. How read hierarchical data on the same table with SQL server
2000 and a SqlDataReader ?

Thanks for your help,

Christopher.