I am trying to implement recordset paging. I have read a series of articles such as [url]http://www.aspfaqs.com/webtech/042606-1.shtml[/url] and have the basics working. I am hoping someone may be able to help me with the ordering.These techniques require the UniqueID to be sorted. What if I want users to be able to sort the results by a text field or date? When I try and change the Order By clause the results are thrown out! Can any one help me understand CREATE PROCEDURE Paged( @PageNo int, @maximumRows int) ASDECLARE @First_id int, @StartRow intSet @PageNo = (@PageNo * @maximumRows) - (@MaximumRows - 1)SET ROWCOUNT @PageNo SELECT @first_id = UniqueID FROM DirectoryItems WHERE Itemname='a' ORDER BY UniqueIDSET ROWCOUNT @maximumRows SELECT * FROM DirectoryItems WHERE UniqueID >= @first_id AND ItemName='a' ORDER BY UniqueIDSET ROWCOUNT 0GO