Interesting; this is a problem that I saw earlier when using IDataReader, so I now religiously consume all tables (even if I only expect them) - for example, if I only expect one table, something like:
while (reader.Read())
{ // read data from first table
}
// read to end of stream
while (reader.NextResult()) { }
The problem is that the error goes to TDS the moment you raise it; therefore, if you pick it up later SELECT, and then in the table in TDS, and if the reader does not read it until the end of the stream, they may not see it.
- : . , SELECT temp-table (#table) table-variable (@table). - , ( LINQ-to-SQL ), , ExecuteReader - .
( ), DataContext.Translate<T> ORM; :
using(var reader = cmd.ExecuteReader()) {
var result = ctx.Translate<MyResultType>(reader).ToList();
while(reader.NextResult()) {}
return result;
}