What is the value of thisPage.getOrderBy2()? Is it the name of a column or the ordinal position? By the error message, this seems to be an error from ODBC, not SQL Server. Is there any reason why you're not using the OLEDB provider for SQL Server?
-Mike
>In SQL Server 7, Why does :
>
> recPg.setSQLText("select distinct * from whatsnew ORDER BY " + thisPage.getOrderBy2() )
>
>give the error message:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
>
> ODBC driver does not support the requested properties.
>
> /jprelec/_ScriptLibrary/Recordset.ASP, line 636
>
>when:
>
> recPg.setSQLText("select * from whatsnew ORDER BY " + thisPage.getOrderBy2() )
>
>works absolutely fine ????
>
>The ONLY difference is thge first statement has the DISTINCT clause in it
>
>Help anyone please