By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

TableAdapter and ROW_NUMBER problem

P: n/a
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.
Feb 23 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.