Paging compatible SQL 2008

Added support for paging in SQL 2008.