Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Sorting a Recordset returned by SQL Server 7.0


Message #1 by "Anupama Nallari" <anallari@p...> on Tue, 18 Sep 2001 16:08:54
Hi,

I have a Sql Server 7.0 stored procedure return a recordset to the asp.

Then I am trying to sort the recordset by using the following code:



rstsupport.sort ="Priority"



This line of code generates the error.



ADODB.Recordset (0x800A0CB3)

This operation is not provided by Current provider does not support the 

necessary interfaces for sorting or filtering.

I have set the cursor type to adopendynamic and the cursor location to 

aduseclient.

Has anyone used sort with SQL server 7.0 recordsets? 



Thanks,

Anu
Message #2 by "Iyappan P" <iyappan_p@h...> on Tue, 18 Sep 2001 19:47:48
I think the problem is with the cursor type.  I think you should use static 

cursor instead of dynamic cursor.

For example:

rstsupport.CursorLocation = adUseClient

rstsupport.Open cmd, , adOpenStatic, adLockBatchOptimistic

rstsupport.sort ="Priority"



I think the above code will work. I don't have sql server at my office. 

otherwise I can work this and send u the code. Try this one. I will send you 

the working code today evening.



Thanks,

Iyappan







>From: "Anupama Nallari" <anallari@p...>

>Reply-To: "ASP Databases" <asp_databases@p...>

>To: "ASP Databases" <asp_databases@p...>

>Subject: [asp_databases] Sorting a Recordset returned by SQL Server 7.0

>Date: Tue, 18 Sep 2001 16:08:54

>

>Hi,

>I have a Sql Server 7.0 stored procedure return a recordset to the asp.

>Then I am trying to sort the recordset by using the following code:

>

>rstsupport.sort ="Priority"

>

>This line of code generates the error.

>

>ADODB.Recordset (0x800A0CB3)

>This operation is not provided by Current provider does not support the

>necessary interfaces for sorting or filtering.

>I have set the cursor type to adopendynamic and the cursor location to

>aduseclient.

>Has anyone used sort with SQL server 7.0 recordsets?

>

>Thanks,

>Anu

>

>


  Return to Index