TableAdapter and ROW_NUMBER problem

R

rpuertas

Hello,

Visual Web Developer 2005 Express Edition and SQL Server 2005 Express: I
want to run a paged query within a TableAdapter. In the TableAdapter Query
Configuration Wizard" I write the next query:

SELECT usu_id, usu_name, usu_password
FROM (SELECT TOP (@StartRowIndex + @NumRows - 1) ROW_NUMBER() OVER
(ORDER BY usu_name DESC)
AS row, usu_id, usu_name, usu_password FROM users)
AS users_rows
WHERE row between @StartRowIndex AND @StartRowIndex + @NumRows - 1

but the next error apperas:

"The wizard detected the following problems when configuring TableAdapter
query "FillBy":
Details:

Generated SQL statement.

The OVER SQL construct or statement is not supported.

But, if I run the query from within Microsoft SQL Server Management Studio
Express, It runs Ok

¿Where is the problem? ¿It's there any solution?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top