ELcin
|
| Posted: 04/28/2002, 5:35 AM |
|
I am creating a page with Page Wizard (Grid-Record Page)and using the Pubs database. It is a very simple page to see if it will work. And it is giving me this error when I want to sort the grid according to any columns.
Microsoft OLE DB Provider for SQL Server (0x80040E14)
An ORDER BY clause is invalid in views, derived tables, and subqueries unless TOP is also specified.
/newProject1/Classes.asp, line 1412
Any help is appreciated.
|
|
|
 |
Allen
|
| Posted: 04/28/2002, 6:40 AM |
|
Me too.
But If DB is Access,it will be OK.
|
|
|
 |
Nicole
|
| Posted: 04/29/2002, 5:37 AM |
|
Hello,
the problem is cause by using Order By clause in subquery (subquery is used in count records query). The problem is db related, e.g. Access accepts "order by" in subqueries but MSSQL not.
For the time being you can exclude "order by" from query by yourself. As CC Studio has code editor you can look at Classes.asp and slightly modify Get RecordsCount() property if you are quite familiar to ASP.
|
|
|
 |
|