I would like to write a T-SQL statement, that structures data to be loaded into a Ado.Net DataSet like it was possible with the ADO SHAPE command. Is there something similar in T-SQL?
My idea is to select multiple rows from a main table and all related records from a child table. That data would get loaded in to a DataSet and then I would create relations and use GetChildRows().
The most straight forward solution would be to select records from the main table into a temp table and then use "select * from child_table where ParentID in (select Id from #temp)". But in more complex scenarios the code will become quite ugly.
Is there a better solution available?
The answer is quite simple: It's not possible at all! :-(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With