im wondering how you would ensure that the results returned from a SProc, and stored in a datatable, are not too large to be handled in memory.
Ive had a dig already and found the following Find size of object instance in bytes in c# but the selected answer suggests not doing this.
Im assuming this is an issue which has been solved before so id appreciate any pointers.
Thanks.
You may want to implement paging.
To do this, add
@pageNumand@pageSizeparameters to yourSPand change the query: