PRB: Setting the Sort Property of an ADO Recordset Object Causes Run-Time Error Message 3251 (253248)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.01
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q253248 SYMPTOMS
Setting the Sort property of an ADO Recordset object whose CursorLocation property has not been explicitly set or has been set to adUseServer, causes the following error message to appear:
Runtime error '3251': The operation requested by the application is not supported by the Provider
Or, under MDAC 2.6 or later, the following message will appear:
Runtime error '3251': Current provider does not support the necessary
interfaces for sorting or filtering.
CAUSE
The provider in use does not expose the OLEDB interfaces required by the ADO Sort method. These are optional interfaces. Most OLEDB providers do not support the Sort method when using server-side cursors.
RESOLUTION
The ADO Client Cursor Engine does support the Sort method. Set the CursorLocation property of the ADO recordset object to adUseClient before opening it.
-or-
If the OLEDB provider supports a query language, such as SQL, you can request the records in a sorted order. For example, the Microsoft Jet and Microsoft SQL Server OLEDB providers both support the SQL ORDER BY clause. If you want to re-sort the data, you have to either re-select it or use a client-side cursor.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 11/6/2003 |
---|
Keywords: | kbprb KB253248 |
---|
|