Getting row right after insert returns no result
- by Peekyou
I am running unit tests and when I try to insert data in the database and getting it right after, I don't get anything (I have tried with DataAdapter and DataReader).
However when I put a 3 seconds sleep (even with 1 second it doesn't work...) between the insert and the select I get the result.
In SQL Server Profiler I can see the execution, the insert is well done and is completed about 10 miliseconds before the select begins.
I can't find out where this comes