Results 1 to 2 of 2

Thread: recordset.sort

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    13

    Exclamation

    friends,
    Does ADO 2.0 not support this method?
    I use Access mdb and jet oledb 3.5.1,
    the compiler warned this method is not supported by the provider.
    How to manage this?
    Update to new edition?
    Thanks!

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    I did this with ADO 2.5 & Jet 3.51 driver...you might just have to use a client side cursor instead of the default server side cursor for this to work:

    Code:
        Dim rs As ADODB.Recordset
        
        Set rs = New Recordset
        
        With rs
            'must use client cursor
            .CursorLocation = adUseClient
            
            'open rs
            .Open "Select * from Customers", "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=Nwind.mdb", adOpenStatic, adLockReadOnly, adCmdText
            
            'sort it
            .Sort = "CustomerID desc"
            
            'sort successful
            MsgBox .Fields(0)
            
        End With
    
        'cleanup....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width