I am trying to determine the amount of data returned to a .NET application from SQL Server for an arbitrary SQL command. The column structure is not known at compile-time. I'm not interested in the data itself, just the length.
long size = 0;
using (SqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
//size += size of current reader row ?
}
}
Is there any way to do this?