>Your stack trace shows a call to CopyToDataTable, but nothing in the code you posted appears to be calling that.
I guess I was wrong in the identifying the source of the error originally. It seems to be happening on this line
dtResources = dtReturn.Select("", orderBy).CopyToDataTable();
dtReturn is empty in the debugger.
So, I added an extra check for Rows.Count = 0 to fix it.
If it's not broken, fix it until it is.
My Blog