SQLTeam.com | Weblogs | Forums

View not returning data from recently inserted rows...timing issue?

Hi,

I have a series of unit tests for an application written in Java. A unit test inserts data into tables and queries a view and the inserts and view query are wrapped withing the same java transaction so if the test fails the data can be rolled back. The problem I'm having is that the view does not return the inserted data unless I put in a delay between the insert and the view query. Other than moving the view query outside of the transaction are they any table hints or anything else I can use to make sure the view returns the inserted data. I'm guessing the issue is the I/O has not completed before the view query fires...

Thanks for any feedback