Is an insert with autocommit guaranteed to be immediately visible to any/every SqlConnection on the database, or only on it's own SqlConnection?
I have a procedure with 3 SqlConnections. Connection One is associated with a SqlDataReader which is driving a loop. Withing the loop, Connection Two is used to get data for test, and Connection Three is used to insert rows in a table. The insert autocommits.
We have a situation where the test (using Connection Two data) is failing. One possible explanation is that Connection Two sometimes does not see the row inserted by Connection Three on the previous pass through the loop. Is this possible?
I don't see a problem with combining Two and Three, and I'm going to do that, but I don't have any way to force this error to occur, and I'd like to know if this explanation is even possible.