>Impossible to tell what's going on from the code that you posted since neither method directly calls the ProcessDataTable() method. But 'exact same code' will produce the same result so you've got a difference somewhere :-}
The other strange thing is that I see nothing in the SQL Server Profiler when that code is being executed. I trace it in MS Visual Studio, start the trace right before
protected Boolean ProcessDataTable(SqlCommand toSqlCommand)
{
using (SqlDataReader sqlDataReader = toSqlCommand.ExecuteReader())
{
table = new DataTable();
if (sqlDataReader.HasRows)
table.Load(sqlDataReader);
}
return true;
}
and stop when I'm returning. The toSqlCommand is correct, parameter is OK, but I do not see it being run in the SQL Server Profiler. What can be a problem here?
If it's not broken, fix it until it is.
My Blog