Getting row right after insert returns no result

Posted by Peekyou on Stack Overflow See other posts from Stack Overflow or by Peekyou
Published on 2012-11-08T10:58:56Z Indexed on 2012/11/08 11:00 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET