I was just writing some wrapper code for our database access layer, and I noticed that ExecuteNonQuery seems to be behaving differently than I thought it behaved. It says it returns the count of the records affected. I had thought that if you were executing multiple queries in your stored proc, it would return the records affected by only the last query. However, it appears to be returning the sum of the records affected from all queries.
Is this something that has changed in .Net 2.0, or maybe in SQL Server 2005? It doesn't really affect us that much, but if it has in fact changed I can see that breaking alot of peoples code where they were performing a check against the return value to ensure it was as expected.