PDA

Click to See Complete Forum and Search --> : recordset.sort


ling_lh
Aug 5th, 2000, 08:54 PM
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!

Clunietp
Aug 6th, 2000, 02:23 PM
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:


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....