Hi
Is there an easy way of populating an ADO dataset with a set of tables (and their data) from SQL Server and then all their relations based on the Foreign Key constraints defined on the SQL server database.
All examples I have seen online when googling show the relations being coded one by one in C# but I want them to be taken automatically from the relations that already exist on the tables in SQL server as FK constraints.
I am using c# under .NET Framework 4
I want to do something like......
1. Declare dataset.
2. List tables I am interested in and add these to the dataset with all of their data.
3. Add all relations based on FK Constraints in SQL Server DB.
Is there an easy way of populating an ADO dataset with a set of tables (and their data) from SQL Server and then all their relations based on the Foreign Key constraints defined on the SQL server database.
All examples I have seen online when googling show the relations being coded one by one in C# but I want them to be taken automatically from the relations that already exist on the tables in SQL server as FK constraints.
I am using c# under .NET Framework 4
I want to do something like......
1. Declare dataset.
2. List tables I am interested in and add these to the dataset with all of their data.
3. Add all relations based on FK Constraints in SQL Server DB.