Hi, Glenn,
Prior to SQL '05, TOP N cannot be a variable. You'll need to use dynamic SQL....OR...you can set the @ROWCOUNT value and then set it back after the query. Check @RowCount in books on line for details.
In SQL '05, TOP N can now be a true variable....you can do
SELECT top (@PageSize)
Hope that helps...
Kevin