Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Paging pattern when background deletions occur

Author  Topic 

vermorel
Starting Member

26 Posts

Posted - 2007-11-19 : 04:10:44
I have a SQL table with potentially a lot of data in it.

In order to retrieve all the information from the table, I have devised a simple paging scheme, from the C# client, it's simply a method

void GetData(int index, int pageSize, out object[] row)

Yet, this scheme is wrong because in my situation concurrent row deletions can occur, making the index value incorrect. As a results, when row are deleted, the retrieval process might skip rows.

I would need a paging pattern that would be resistant to background row deletions.

Does anyone knows how to do that?

Thanks in advance,
Joannès
http://www.lokad.com sales forecasting

evilDBA
Posting Yak Master

155 Posts

Posted - 2007-11-19 : 05:25:39
Use snapshot isolation level
Go to Top of Page
   

- Advertisement -